Philipp Hörist pushed to branch master at gajim / gajim
Commits:
068274fe by Philipp Hörist at 2019-12-27T22:11:19Z
MessageInput: Set min height for vertical scrollbar
Fixes #9574, #8980
- - - - -
2 changed files:
- gajim/chat_control_base.py
- gajim/data/style/gajim.css
Changes:
=====================================
gajim/chat_control_base.py
=====================================
@@ -1567,22 +1567,6 @@ class ScrolledWindow(Gtk.ScrolledWindow):
self.get_style_context().add_class('scrolled-no-border')
self.get_style_context().add_class('no-scroll-indicator')
self.get_style_context().add_class('scrollbar-style')
+ self.get_style_context().add_class('one-line-scrollbar')
self.set_shadow_type(Gtk.ShadowType.IN)
-
- def do_get_preferred_height(self):
- min_height, natural_height =
Gtk.ScrolledWindow.do_get_preferred_height(self)
- # Gtk Bug: If policy is set to Automatic, the ScrolledWindow
- # has a min size of around 46-82 depending on the System. Because
- # we want it smaller, we set policy NEVER if the height is < 90
- # so the ScrolledWindow will shrink to around 26 (1 line height).
- # Once it gets over 90 its no problem to restore the policy.
- if natural_height < 90:
- GLib.idle_add(self.set_policy,
- Gtk.PolicyType.AUTOMATIC,
- Gtk.PolicyType.NEVER)
- else:
- GLib.idle_add(self.set_policy,
- Gtk.PolicyType.AUTOMATIC,
- Gtk.PolicyType.AUTOMATIC)
-
- return min_height, natural_height
+ self.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)
=====================================
gajim/data/style/gajim.css
=====================================
@@ -21,6 +21,7 @@
.scrollbar-style scrollbar trough {background-color:@theme_base_color; }
.scrollbar-style scrollbar {border:none; }
.scrollbar-style slider {min-width: 3px; background-color: #a0a3a4}
+.one-line-scrollbar scrollbar.vertical slider { min-height: 20px; }
.actionbar-no-border box {border: none}
.actionbar-no-border button {
View it on GitLab:
https://dev.gajim.org/gajim/gajim/commit/068274feed324433a12313a97c4eeff52a3de572
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/commit/068274feed324433a12313a97c4eeff52a3de572
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits