[gtk+/lapo-overlay: 2/2] Temporary hack to avoid fading overlay scrollbars
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/lapo-overlay: 2/2] Temporary hack to avoid fading overlay scrollbars
- Date: Mon, 27 Oct 2014 23:07:29 +0000 (UTC)
commit 0d63fdadfe471359b1f6fe45a92aa216480a73b5
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Oct 27 19:05:10 2014 -0400
Temporary hack to avoid fading overlay scrollbars
Temporarily allow disabling the fade out of overlay scrollbars
by setting GTK_OVERLAY_SCROLLING_NO_FADE=1. This is meant to
facilitate theming the overlay scrollbars.
gtk/gtkscrolledwindow.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index 5a0b410..79848ba 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -3397,7 +3397,8 @@ indicator_set_fade (Indicator *indicator,
if (visible && !gdk_window_is_visible (indicator->window))
{
gdk_window_show (indicator->window);
- indicator->conceil_timer = g_timeout_add (INDICATOR_FADE_OUT_TIME, maybe_hide_indicator, indicator);
+ if (!g_getenv ("GTK_OVERLAY_SCROLLING_NO_FADE"))
+ indicator->conceil_timer = g_timeout_add (INDICATOR_FADE_OUT_TIME, maybe_hide_indicator, indicator);
}
if (!visible && gdk_window_is_visible (indicator->window))
{
@@ -3589,6 +3590,9 @@ setup_indicator (GtkScrolledWindow *scrolled_window,
gdk_window_hide (indicator->window);
gtk_widget_set_opacity (scrollbar, 0.0);
indicator->current_pos = 0.0;
+
+ if (g_getenv ("GTK_OVERLAY_SCROLLING_NO_FADE"))
+ indicator_start_fade (indicator, 1.0);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]