logo

badwolf

Minimalist and privacy-oriented WebKitGTK+ browser
commit: f2f9b3cf2c130c0f165cdb6a604bc2be24c45eae
parent: 2f2c09c5962b2aeadd115fa2f0330c56002d2a61
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Sun, 14 Apr 2019 06:42:14 +0200

Allow to set the tab min-width in pixels

Diffstat:

Mbadwolf.c5+++++
Mconfig.h9++++++++-
2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/badwolf.c b/badwolf.c @@ -136,7 +136,12 @@ badwolf_new_tab_box(const gchar *title, struct Client *browser) GtkWidget *playing = gtk_image_new_from_icon_name("audio-volume-high-symbolic", GTK_ICON_SIZE_SMALL_TOOLBAR); +#ifdef BADWOLF_TAB_BOX_WIDTH + gtk_widget_set_size_request(label, BADWOLF_TAB_BOX_WIDTH, -1); +#endif +#ifdef BADWOLF_TAB_LABEL_CHARWIDTH gtk_label_set_width_chars(GTK_LABEL(label), BADWOLF_TAB_LABEL_CHARWIDTH); +#endif gtk_widget_set_hexpand(tab_box, BADWOLF_TAB_HEXPAND); gtk_label_set_ellipsize(GTK_LABEL(label), BADWOLF_TAB_LABEL_ELLIPSIZE); diff --git a/config.h b/config.h @@ -8,9 +8,16 @@ */ #define BADWOLF_TAB_POSITION GTK_POS_TOP -// BADWOLF_TAB_LABEL_CHARWIDTH: Amount of characters the tab label text fits +/* BADWOLF_TAB_LABEL_CHARWIDTH: Amount of characters the tab label text fits + * Quite conflicts with BADWOLF_TAB_BOX_WIDTH, recommended to only define one + */ #define BADWOLF_TAB_LABEL_CHARWIDTH 26 +/* BADWOLF_TAB_BOX_WIDTH: Requested width (in pixels) for the whole tab + * Quite conflicts with BADWOLF_TAB_LABEL_CHARWIDTH, recommended to only define one + */ +//#define BADWOLF_TAB_BOX_WIDTH 120 + // BADWOLF_TAB_HEXPAND: Should the tab try to fill the available horizontal space? #define BADWOLF_TAB_HEXPAND TRUE