commit: 71b8af9d8c050ae6a78b76faf118751e2dd5607a
parent: 0b34230b5c62116b79bb75d84c8a3c8acaf853d0
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Tue, 2 Jul 2019 03:12:41 +0200
Prevent the statusbar label from resizing the window
Diffstat:
2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/badwolf.c b/badwolf.c
@@ -735,6 +735,7 @@ new_browser(struct Window *window, gchar *target_url, WebKitWebView *related_web
gtk_widget_set_halign(browser->statusbar, GTK_ALIGN_START);
gtk_label_set_single_line_mode(GTK_LABEL(browser->statuslabel), TRUE);
+ gtk_label_set_ellipsize(GTK_LABEL(browser->statuslabel), BADWOLF_STATUSLABEL_ELLIPSIZE);
gtk_entry_set_text(GTK_ENTRY(browser->location), target_url);
gtk_entry_set_has_frame(GTK_ENTRY(browser->location), FALSE);
diff --git a/config.h b/config.h
@@ -69,3 +69,13 @@
"minimum-font-size", 9, \
NULL
// clang-format on
+
+/* BADWOLF_STATUSLABEL_ELLIPSIZE: pango ellipsize mode of the status bar label text, can be one of:
+ * - PANGO_ELLIPSIZE_NONE
+ * - PANGO_ELLIPSIZE_START
+ * - PANGO_ELLIPSIZE_MIDDLE
+ * - PANGO_ELLIPSIZE_END
+ *
+ * See https://developer.gnome.org/pango/stable/pango-Layout-Objects.html#PangoEllipsizeMode
+ */
+#define BADWOLF_STATUSLABEL_ELLIPSIZE PANGO_ELLIPSIZE_MIDDLE