From 123ae472e2668a1f57f7c69a1a2a59336f83d06a Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Tue, 25 Mar 2014 13:06:04 +0100 Subject: Fix disappearing transient scrollbars When a transient scrollbar is already at the end and user attempts to scroll further, the scrollbar is "flashed" to indicate that the scroll area is already scrolled to the end. This is done so that the scrollbar is first painted with a flag turned on to make it appear visible and then again with the flag turned off to make qstyle start fading it out. The previous code that relied on paint events to clear the flag was error prone, and caused the scrollbars to get stuck in an inconsistent state. This change makes sure that the flag gets cleared regardless of whether a paint event in each state is received or not. Task-number: QTBUG-37787 Change-Id: I907697c32cd4d55208a490804a221a5dd6bf7b0b Reviewed-by: Gabriel de Dietrich --- src/widgets/widgets/qscrollbar_p.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/widgets/widgets/qscrollbar_p.h') diff --git a/src/widgets/widgets/qscrollbar_p.h b/src/widgets/widgets/qscrollbar_p.h index c62c337a40..5fc714d530 100644 --- a/src/widgets/widgets/qscrollbar_p.h +++ b/src/widgets/widgets/qscrollbar_p.h @@ -81,6 +81,7 @@ public: void setTransient(bool value); bool flashed; + int flashTimer; void flash(); }; -- cgit v1.2.3