commit: 2f2c09c5962b2aeadd115fa2f0330c56002d2a61
parent: fd6724c522448a6ee0b8a3a30f869fc141903bcf
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Sun, 14 Apr 2019 06:40:57 +0200
Expand the tabs to fill the whole space
Diffstat:
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/badwolf.c b/badwolf.c
@@ -137,12 +137,14 @@ badwolf_new_tab_box(const gchar *title, struct Client *browser)
gtk_image_new_from_icon_name("audio-volume-high-symbolic", GTK_ICON_SIZE_SMALL_TOOLBAR);
gtk_label_set_width_chars(GTK_LABEL(label), BADWOLF_TAB_LABEL_CHARWIDTH);
+ gtk_widget_set_hexpand(tab_box, BADWOLF_TAB_HEXPAND);
+
gtk_label_set_ellipsize(GTK_LABEL(label), BADWOLF_TAB_LABEL_ELLIPSIZE);
gtk_label_set_single_line_mode(GTK_LABEL(label), TRUE);
gtk_box_pack_start(GTK_BOX(tab_box), playing, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(tab_box), label, TRUE, TRUE, 0);
- gtk_box_pack_start(GTK_BOX(tab_box), close, TRUE, TRUE, 0);
+ gtk_box_pack_start(GTK_BOX(tab_box), close, FALSE, FALSE, 0);
gtk_button_set_relief(GTK_BUTTON(close), GTK_RELIEF_NONE);
diff --git 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