aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/util/helper.vala
diff options
context:
space:
mode:
authorbobufa <bobufa@users.noreply.github.com>2018-07-25 20:41:51 +0200
committerbobufa <bobufa@users.noreply.github.com>2018-08-13 22:39:18 +0200
commite376a577b6bfcdd9bdc0cc6ca283d99199a0197a (patch)
tree741cab1ce822fcfc89655e762abfe2ceb3892357 /main/src/ui/util/helper.vala
parent4901b096708ff5ca54c3e5393de74f2a8be55894 (diff)
downloaddino-e376a577b6bfcdd9bdc0cc6ca283d99199a0197a.tar.gz
dino-e376a577b6bfcdd9bdc0cc6ca283d99199a0197a.zip
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)
Diffstat (limited to 'main/src/ui/util/helper.vala')
-rw-r--r--main/src/ui/util/helper.vala13
1 files changed, 9 insertions, 4 deletions
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);
+}
+
}