[Xfce4-commits] <xfwm4:master> 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

Nick Schermer noreply at xfce.org
Sun Feb 23 21:10:23 CET 2014


Updating branch refs/heads/master
         to 1cf53af20b5086eba7dbc47d8237b42514d32f9d (commit)
       from 3503b8e6cffd83d7198b18d7af747c7f903b477e (commit)

commit 1cf53af20b5086eba7dbc47d8237b42514d32f9d
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