[Xfce4-commits] <xfwm4:ochosi/tabwin> Install a new style property "listview-icon-size" themes can add "Xfwm4TabwinWidget::listview-icon-size = $n" to set the appicon-size in the tabwin's new listview. Currently min=16 and max=48
Simon Steinbeiss
noreply at xfce.org
Mon Dec 2 16:14:01 CET 2013
Updating branch refs/heads/ochosi/tabwin
to 034ff38453afbae11d9d0768609e83faace49fbf (commit)
from 7199f04e2164e84efc14990098056a289167dd41 (commit)
commit 034ff38453afbae11d9d0768609e83faace49fbf
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Mon Dec 2 16:13:34 2013 +0100
Install a new style property "listview-icon-size"
themes can add "Xfwm4TabwinWidget::listview-icon-size = $n" to set the appicon-size in the tabwin's new listview. Currently min=16 and max=48
src/tabwin.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/src/tabwin.c b/src/tabwin.c
index 237b44e..3fadbfe 100644
--- a/src/tabwin.c
+++ b/src/tabwin.c
@@ -28,6 +28,10 @@
#define WIN_ICON_SIZE 48
#endif
+#ifndef LISTVIEW_WIN_ICON_SIZE
+#define LISTVIEW_WIN_ICON_SIZE 24
+#endif
+
#ifndef WIN_ICON_BORDER
#define WIN_ICON_BORDER 5
#endif
@@ -439,7 +443,8 @@ createWindowlist (ScreenInfo *screen_info, TabwinWidget *tbw)
}
else
{
- icon_size = 24;
+ icon_size = LISTVIEW_WIN_ICON_SIZE;
+ gtk_widget_style_get (GTK_WIDGET (tbw), "listview-icon-size", &icon_size, NULL);
tbw->grid_rows = (monitor_height / (icon_size + 2 * WIN_ICON_BORDER)) * 0.75;
tbw->grid_cols = screen_info->client_count / tbw->grid_rows + 1;
}
@@ -561,6 +566,13 @@ tabwin_widget_class_init (TabwinWidgetClass *klass)
WIN_ICON_SIZE,
G_PARAM_READABLE));
gtk_widget_class_install_style_property (widget_class,
+ g_param_spec_int("listview-icon-size",
+ "listview icon size",
+ "the size of the application icon in listview",
+ 16, 48,
+ LISTVIEW_WIN_ICON_SIZE,
+ G_PARAM_READABLE));
+ gtk_widget_class_install_style_property (widget_class,
g_param_spec_int("border-width",
"border width",
"the width of the colored border",
More information about the Xfce4-commits
mailing list