diff options
author | Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com> | 2016-02-05 16:41:20 -0800 |
---|---|---|
committer | Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com> | 2016-02-11 04:50:36 +0000 |
commit | 9e8c84aa14ee26c04ab04ff28f0bab22e04887d6 (patch) | |
tree | 5136a2afb0bdcdfa5e0e27adebe5c02f4fa3d411 /src/widgets/itemviews/qabstractitemview_p.h | |
parent | cc2938b5b6aa07210b04bd48ad8a2830701a06e5 (diff) |
Add SH_ItemView_ScrollMode style hint and use it in QMacStyle
On OS X, the default scrolling mode of item views should be
per pixel instead of per item. We enforce this through a new
style hint. On all other platforms, the behavior remains the
same.
It's still possible to override the style hint by using the
regular scroll mode setters. Any subsequent style change will
result in a no-op once the setters have been called and until
the properties are reset.
Some auto-tests had to be update to to take the new behavior
into account.
[ChangeLog][QtWidgets][Styles] Added SH_ItemView_ScrollMode
style hint.
[ChangeLog][QtWidgets][Item Views] Item views scroll per pixel
on OS X now.
[ChangeLog][QtWidgets][Item Views] QAbstractItemView::verticalScrollMode
and QAbstractItemView::horizontalScrollMode are now resettable.
Change-Id: I3f923275c99aa4389323b52fc1c5455fe71f8d73
Task-number: QTBUG-50102
Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
Diffstat (limited to 'src/widgets/itemviews/qabstractitemview_p.h')
-rw-r--r-- | src/widgets/itemviews/qabstractitemview_p.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/widgets/itemviews/qabstractitemview_p.h b/src/widgets/itemviews/qabstractitemview_p.h index 4ba24a2786..a3af79abcb 100644 --- a/src/widgets/itemviews/qabstractitemview_p.h +++ b/src/widgets/itemviews/qabstractitemview_p.h @@ -461,6 +461,10 @@ public: mutable bool delayedPendingLayout; bool moveCursorUpdatedView; + // Whether scroll mode has been explicitly set or its value come from SH_ItemView_ScrollMode + bool verticalScrollModeSet; + bool horizontalScrollModeSet; + private: mutable QBasicTimer delayedLayout; mutable QBasicTimer fetchMoreTimer; |