[gtk/overlay-scrolling-setting: 2/2] scrolled window: respect overlay-scrolling setting
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/overlay-scrolling-setting: 2/2] scrolled window: respect overlay-scrolling setting
- Date: Wed, 22 May 2019 19:39:52 +0000 (UTC)
commit b822794cb8c0a7e5bc47143be337e3a482b46d9d
Author: Matthias Clasen <mclasen redhat com>
Date: Wed May 22 19:34:46 2019 +0000
scrolled window: respect overlay-scrolling setting
If the gtk-overlay-scrolling setting is FALSE,
don't use overlay scrollbars.
gtk/gtkscrolledwindow.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index 2ba312e741..d7af96005c 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -3811,8 +3811,12 @@ gtk_scrolled_window_update_use_indicators (GtkScrolledWindow *scrolled_window)
{
GtkScrolledWindowPrivate *priv = gtk_scrolled_window_get_instance_private (scrolled_window);
gboolean use_indicators;
+ GtkSettings *settings = gtk_widget_get_settings (GTK_WIDGET (scrolled_window));
+ gboolean overlay_scrolling;
- use_indicators = priv->overlay_scrolling;
+ g_object_get (settings, "gtk-overlay-scrolling", &overlay_scrolling, NULL);
+
+ use_indicators = overlay_scrolling && priv->overlay_scrolling;
if (priv->use_indicators != use_indicators)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]