diff options
author | Jan Arve Sæther <jan-arve.saether@qt.io> | 2020-10-29 17:01:27 +0100 |
---|---|---|
committer | Jan Arve Sæther <jan-arve.saether@qt.io> | 2020-12-10 16:21:21 +0100 |
commit | 64fd0b53b378ef91725d4950720c3bdfaee11498 (patch) | |
tree | 4860bf008c3437a41575e9a05dda8eba96f05848 /src/quicktemplates2/qquickscrollbar_p_p.h | |
parent | 8d061f542181cfe0ac9052948c869d87ce80589b (diff) |
Add support for ScrollBar arrow buttons
In order to achieve this, it separates out QQuickSpinButton into a
separate file (and renames it since it's not only purposed for SpinBox
anymore). This allows it to be also used by QQuickScrollBar.
Fixes: QTBUG-88115
Pick-to: 6.0
Change-Id: I2dea42b29750b7bc619031f40a43717fc10c177b
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickscrollbar_p_p.h')
-rw-r--r-- | src/quicktemplates2/qquickscrollbar_p_p.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquickscrollbar_p_p.h b/src/quicktemplates2/qquickscrollbar_p_p.h index 5c7628b9..4c4f72dd 100644 --- a/src/quicktemplates2/qquickscrollbar_p_p.h +++ b/src/quicktemplates2/qquickscrollbar_p_p.h @@ -55,6 +55,7 @@ QT_BEGIN_NAMESPACE class QQuickFlickable; +class QQuickIndicatorButton; class QQuickScrollBarPrivate : public QQuickControlPrivate { @@ -82,6 +83,8 @@ public: void setInteractive(bool interactive); void updateActive(); void resizeContent() override; + void itemImplicitWidthChanged(QQuickItem *item) override; + void itemImplicitHeightChanged(QQuickItem *item) override; void handlePress(const QPointF &point) override; void handleMove(const QPointF &point) override; @@ -90,6 +93,10 @@ public: void visualAreaChange(const VisualArea &newVisualArea, const VisualArea &oldVisualArea); + void updateHover(const QPointF &pos, std::optional<bool> newHoverState = {}); + + QQuickIndicatorButton *decreaseVisual = nullptr; + QQuickIndicatorButton *increaseVisual = nullptr; qreal size = 0; qreal position = 0; qreal stepSize = 0; |