From 2f2c09c5962b2aeadd115fa2f0330c56002d2a61 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Sun, 14 Apr 2019 06:40:57 +0200 Subject: Expand the tabs to fill the whole space --- config.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'config.h') diff --git a/config.h b/config.h index e41472f..3ba085a 100644 --- a/config.h +++ b/config.h @@ -11,6 +11,9 @@ // BADWOLF_TAB_LABEL_CHARWIDTH: Amount of characters the tab label text fits #define BADWOLF_TAB_LABEL_CHARWIDTH 26 +// BADWOLF_TAB_HEXPAND: Should the tab try to fill the available horizontal space? +#define BADWOLF_TAB_HEXPAND TRUE + /* BADWOLF_TAB_LABEL_ELLIPSIZE: pango ellipsize mode of the tab label text, can be one of: * - PANGO_ELLIPSIZE_NONE * - PANGO_ELLIPSIZE_START -- cgit v1.3.1-26-gb76a From f2f9b3cf2c130c0f165cdb6a604bc2be24c45eae Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Sun, 14 Apr 2019 06:42:14 +0200 Subject: Allow to set the tab min-width in pixels --- badwolf.c | 5 +++++ config.h | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'config.h') diff --git a/badwolf.c b/badwolf.c index 9a5ff83..668e0eb 100644 --- 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 index 3ba085a..3011648 100644 --- 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 -- cgit v1.3.1-26-gb76a From 8c0525b56e6ad402eeff18af58eb1ce4d9e8be47 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Thu, 18 Apr 2019 12:37:29 +0200 Subject: config.h: Keep tab expansion off by default --- config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config.h') diff --git a/config.h b/config.h index 3011648..07ff0f8 100644 --- a/config.h +++ b/config.h @@ -19,7 +19,7 @@ //#define BADWOLF_TAB_BOX_WIDTH 120 // BADWOLF_TAB_HEXPAND: Should the tab try to fill the available horizontal space? -#define BADWOLF_TAB_HEXPAND TRUE +#define BADWOLF_TAB_HEXPAND FALSE /* BADWOLF_TAB_LABEL_ELLIPSIZE: pango ellipsize mode of the tab label text, can be one of: * - PANGO_ELLIPSIZE_NONE -- cgit v1.3.1-26-gb76a