Make alt-tab icon size configurable.
This commit is contained in:
parent
e4f0be1ab0
commit
51bc793e04
3 changed files with 15 additions and 3 deletions
|
@ -44,6 +44,7 @@ StrutPartial config_margins;
|
||||||
|
|
||||||
gchar *config_theme;
|
gchar *config_theme;
|
||||||
gboolean config_theme_keepborder;
|
gboolean config_theme_keepborder;
|
||||||
|
guint config_theme_window_list_icon_size;
|
||||||
|
|
||||||
gchar *config_title_layout;
|
gchar *config_title_layout;
|
||||||
|
|
||||||
|
@ -602,6 +603,13 @@ static void parse_theme(xmlNodePtr node, gpointer d)
|
||||||
config_theme_keepborder = obt_parse_node_bool(n);
|
config_theme_keepborder = obt_parse_node_bool(n);
|
||||||
if ((n = obt_parse_find_node(node, "animateIconify")))
|
if ((n = obt_parse_find_node(node, "animateIconify")))
|
||||||
config_animate_iconify = obt_parse_node_bool(n);
|
config_animate_iconify = obt_parse_node_bool(n);
|
||||||
|
if ((n = obt_parse_find_node(node, "windowListIconSize"))) {
|
||||||
|
config_theme_window_list_icon_size = obt_parse_node_int(n);
|
||||||
|
if (config_theme_window_list_icon_size < 16)
|
||||||
|
config_theme_window_list_icon_size = 16;
|
||||||
|
else if (config_theme_window_list_icon_size > 96)
|
||||||
|
config_theme_window_list_icon_size = 96;
|
||||||
|
}
|
||||||
|
|
||||||
n = obt_parse_find_node(node, "font");
|
n = obt_parse_find_node(node, "font");
|
||||||
while (n) {
|
while (n) {
|
||||||
|
@ -962,6 +970,7 @@ void config_startup(ObtParseInst *i)
|
||||||
config_animate_iconify = TRUE;
|
config_animate_iconify = TRUE;
|
||||||
config_title_layout = g_strdup("NLIMC");
|
config_title_layout = g_strdup("NLIMC");
|
||||||
config_theme_keepborder = TRUE;
|
config_theme_keepborder = TRUE;
|
||||||
|
config_theme_window_list_icon_size = 36;
|
||||||
|
|
||||||
config_font_activewindow = NULL;
|
config_font_activewindow = NULL;
|
||||||
config_font_inactivewindow = NULL;
|
config_font_inactivewindow = NULL;
|
||||||
|
|
|
@ -132,6 +132,8 @@ extern gboolean config_theme_keepborder;
|
||||||
extern gchar *config_title_layout;
|
extern gchar *config_title_layout;
|
||||||
/*! Animate windows iconifying and restoring */
|
/*! Animate windows iconifying and restoring */
|
||||||
extern gboolean config_animate_iconify;
|
extern gboolean config_animate_iconify;
|
||||||
|
/*! Size of icons in focus switching dialogs */
|
||||||
|
extern guint config_theme_window_list_icon_size;
|
||||||
|
|
||||||
/*! The font for the active window's title */
|
/*! The font for the active window's title */
|
||||||
extern RrFont *config_font_activewindow;
|
extern RrFont *config_font_activewindow;
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#include "screen.h"
|
#include "screen.h"
|
||||||
#include "focus.h"
|
#include "focus.h"
|
||||||
#include "openbox.h"
|
#include "openbox.h"
|
||||||
|
#include "config.h"
|
||||||
#include "window.h"
|
#include "window.h"
|
||||||
#include "event.h"
|
#include "event.h"
|
||||||
#include "render/render.h"
|
#include "render/render.h"
|
||||||
|
@ -30,16 +31,16 @@
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
|
/* Size of the icons, which can appear inside or outside of a hilite box */
|
||||||
|
#define ICON_SIZE config_theme_window_list_icon_size
|
||||||
/* Size of the hilite box around a window's icon */
|
/* Size of the hilite box around a window's icon */
|
||||||
#define HILITE_SIZE 40
|
#define HILITE_SIZE (ICON_SIZE + 2*HILITE_OFFSET)
|
||||||
/* Width of the outer ring around the hilite box */
|
/* Width of the outer ring around the hilite box */
|
||||||
#define HILITE_WIDTH 2
|
#define HILITE_WIDTH 2
|
||||||
/* Space between the outer ring around the hilite box and the icon inside it */
|
/* Space between the outer ring around the hilite box and the icon inside it */
|
||||||
#define HILITE_MARGIN 1
|
#define HILITE_MARGIN 1
|
||||||
/* Total distance from the edge of the hilite box to the icon inside it */
|
/* Total distance from the edge of the hilite box to the icon inside it */
|
||||||
#define HILITE_OFFSET (HILITE_WIDTH + HILITE_MARGIN)
|
#define HILITE_OFFSET (HILITE_WIDTH + HILITE_MARGIN)
|
||||||
/* Size of the icons, which can appear inside or outside of a hilite box */
|
|
||||||
#define ICON_SIZE (HILITE_SIZE - 2*HILITE_OFFSET)
|
|
||||||
/* Margin area around the outside of the dialog */
|
/* Margin area around the outside of the dialog */
|
||||||
#define OUTSIDE_BORDER 3
|
#define OUTSIDE_BORDER 3
|
||||||
/* Margin area around the text */
|
/* Margin area around the text */
|
||||||
|
|
Loading…
Reference in a new issue