[Xfce4-commits] <xfwm4:ochosi/tabwin> Expand the font-size fix to work for the listview
Simon Steinbeiss
noreply at xfce.org
Tue Dec 3 12:24:01 CET 2013
Updating branch refs/heads/ochosi/tabwin
to da430eb8ffc740cf26d344b77dafb57d8d761790 (commit)
from 034ff38453afbae11d9d0768609e83faace49fbf (commit)
commit da430eb8ffc740cf26d344b77dafb57d8d761790
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