[Xfce4-commits] <xfwm4:master> Expand the font-size fix to work for the listview

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


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

commit de06e532227ccbe1313bb82b6e021f08b0639aa5
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date:   Tue Dec 3 12:22:32 2013 +0100

    Expand the font-size fix to work for the listview

 src/tabwin.c |   15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/src/tabwin.c b/src/tabwin.c
index 3fadbfe..08d2f05 100644
--- a/src/tabwin.c
+++ b/src/tabwin.c
@@ -464,13 +464,13 @@ createWindowlist (ScreenInfo *screen_info, TabwinWidget *tbw)
         g_signal_connect (window_button, "leave-notify-event", G_CALLBACK (cb_window_button_leave), tbw);
         gtk_widget_add_events (window_button, GDK_ENTER_NOTIFY_MASK);
 
+        /* We need to account for changes to the font size in the user's
+         * appearance theme and gtkrc settings */
+        layout = gtk_widget_create_pango_layout (GTK_WIDGET (tbw), "");
+        pango_layout_get_pixel_size (layout, NULL, &app_label_height);
+
         if (screen_info->params->cycle_tabwin_mode == STANDARD_ICON_GRID)
         {
-            /* We need to account for changes to the font size in the user's
-             * appearance theme and gtkrc settings */
-            layout = gtk_widget_create_pango_layout (GTK_WIDGET (tbw), "");
-            pango_layout_get_pixel_size (layout, NULL, &app_label_height);
-
             gtk_widget_set_size_request (GTK_WIDGET (window_button), icon_size+24, icon_size+app_label_height+8);
             buttonbox = gtk_vbox_new (FALSE, 0);
             buttonlabel = gtk_label_new ("");
@@ -478,7 +478,10 @@ createWindowlist (ScreenInfo *screen_info, TabwinWidget *tbw)
         }
         else
         {
-            gtk_widget_set_size_request (GTK_WIDGET (window_button), icon_size+256, icon_size+8);
+            if (icon_size < app_label_height)
+                gtk_widget_set_size_request (GTK_WIDGET (window_button), icon_size+256, app_label_height+8);
+            else
+                gtk_widget_set_size_request (GTK_WIDGET (window_button), icon_size+256, icon_size+8);
             buttonbox = gtk_hbox_new (FALSE, 6);
             buttonlabel = gtk_label_new (c->name);
             gtk_misc_set_alignment (GTK_MISC (buttonlabel), 0, 0.5);


More information about the Xfce4-commits mailing list