[Xfce4-commits] <midori:master> Respect close button visibility for tab size

Christian Dywan noreply at xfce.org
Wed Oct 26 20:10:02 CEST 2011


Updating branch refs/heads/master
         to 9738f074293d158f2e89b58206f561ae10540267 (commit)
       from 5ddcfa7be6fb012b0e2d3c3850e079ea4bcdef6f (commit)

commit 9738f074293d158f2e89b58206f561ae10540267
Author: Christian Dywan <christian at twotoasts.de>
Date:   Wed Oct 26 19:40:14 2011 +0200

    Respect close button visibility for tab size
    
    And use the themed icon size.

 midori/midori-browser.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/midori/midori-browser.c b/midori/midori-browser.c
index 1bf8bfc..7f1eaec 100644
--- a/midori/midori-browser.c
+++ b/midori/midori-browser.c
@@ -1519,11 +1519,18 @@ _midori_browser_update_notebook (MidoriBrowser* browser)
     gint new_size = 0;
     gint n = gtk_notebook_get_n_pages (GTK_NOTEBOOK(browser->notebook));
     const gint max_size = 150;
-    const gint min_size = 32;
+    gint min_size;
+    gint icon_size = 16;
     GtkAllocation notebook_size;
 
     gtk_widget_get_allocation (browser->notebook, &notebook_size);
     if (n > 0) new_size = notebook_size.width / n - 7;
+
+    gtk_icon_size_lookup_for_settings (gtk_widget_get_settings (browser->notebook),
+                                       GTK_ICON_SIZE_MENU, &icon_size, NULL);
+    min_size = icon_size;
+    if (katze_object_get_boolean (browser->settings, "close-buttons-on-tabs"))
+        min_size += icon_size;
     if (new_size < min_size) new_size = min_size;
     if (new_size > max_size) new_size = max_size;
 


More information about the Xfce4-commits mailing list