Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
Commit71b8af9d8c050ae6a78b76faf118751e2dd5607a (patch)
Author
 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
2019-07-02 03:12:41 +0200
Committer
 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
2019-07-05 09:12:06 +0200
Files44f73b0f54cdfe4b93825075da53a8a058f973d9
goodwolf-71b8af9d8c050ae6a78b76faf118751e2dd5607a.tar
goodwolf-71b8af9d8c050ae6a78b76faf118751e2dd5607a.tar.gz
goodwolf-71b8af9d8c050ae6a78b76faf118751e2dd5607a.zip
Parent0b34230b5c62116b79bb75d84c8a3c8acaf853d0 (diff)
Prevent the statusbar label from resizing the window
2 files changed, 11 insertions, 0 deletions
-rw-r--r--badwolf.c1
-rw-r--r--config.h10
diff --git a/badwolf.c b/badwolf.c
index 6677d99..9781d31 100644
--- 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
index 07ff0f8..626f6ed 100644
--- 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