sidebar: Fix oscillating scrollbar when hovered at the right place
This is a hack to fix this till the upstream bug is resolved. See: https://gitlab.gnome.org/GNOME/gtk/-/issues/4938 Fixes: https://gitlab.gnome.org/GNOME/fractal/-/issues/925
This commit is contained in:
parent
7d0a61bbc1
commit
99911c3fcf
2 changed files with 10 additions and 1 deletions
|
@ -148,7 +148,7 @@
|
|||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow">
|
||||
<object class="GtkScrolledWindow" id="scrolled_window">
|
||||
<property name="vexpand">True</property>
|
||||
<property name="hscrollbar-policy">never</property>
|
||||
<property name="child">
|
||||
|
|
|
@ -60,6 +60,8 @@ mod imp {
|
|||
#[template_child]
|
||||
pub headerbar: TemplateChild<adw::HeaderBar>,
|
||||
#[template_child]
|
||||
pub scrolled_window: TemplateChild<gtk::ScrolledWindow>,
|
||||
#[template_child]
|
||||
pub listview: TemplateChild<gtk::ListView>,
|
||||
#[template_child]
|
||||
pub room_search_entry: TemplateChild<gtk::SearchEntry>,
|
||||
|
@ -259,6 +261,13 @@ mod imp {
|
|||
btn.set_popover(Some(account_switcher));
|
||||
}
|
||||
}));
|
||||
|
||||
// FIXME: Remove this hack once https://gitlab.gnome.org/GNOME/gtk/-/issues/4938 is resolved
|
||||
self.scrolled_window
|
||||
.vscrollbar()
|
||||
.first_child()
|
||||
.unwrap()
|
||||
.set_overflow(gtk::Overflow::Hidden);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue