From e376a577b6bfcdd9bdc0cc6ca283d99199a0197a Mon Sep 17 00:00:00 2001 From: bobufa Date: Wed, 25 Jul 2018 20:41:51 +0200 Subject: improve sidebar UI - only display messages that are content items - only display messages for active accounts - "fix" textview issue - add empty states (no search, no results) --- main/src/ui/util/helper.vala | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'main/src/ui/util') diff --git a/main/src/ui/util/helper.vala b/main/src/ui/util/helper.vala index 3cadfffb..4e9e942d 100644 --- a/main/src/ui/util/helper.vala +++ b/main/src/ui/util/helper.vala @@ -118,10 +118,6 @@ public static void force_background(Gtk.Widget widget, string color, string sele force_css(widget, force_background_css.printf(selector, color)); } -public static void force_base_background(Gtk.Widget widget, string selector = "*") { - force_background(widget, "@theme_base_color", selector); -} - public static void force_color(Gtk.Widget widget, string color, string selector = "*") { force_css(widget, force_color_css.printf(selector, color)); } @@ -142,4 +138,13 @@ public static bool is_24h_format() { return settings_format == "24h" || p_format == " "; } +// Workaround GTK TextView issues +public static void force_alloc_width(Widget widget, int width) { + Allocation alloc = Allocation(); + widget.get_preferred_width(out alloc.width, null); + widget.get_preferred_height(out alloc.height, null); + alloc.width = width; + widget.size_allocate(alloc); +} + } -- cgit v1.2.3-54-g00ecf