diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2016-11-17 10:31:25 +0100 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2016-11-17 10:24:21 +0000 |
commit | 6a86efd93906c688b22b8a847e9c7d380d951dab (patch) | |
tree | 99a720d34858efcc1af8e3526e49859a48ff7088 /examples/quickcontrols2/gallery/pages/RangeSliderPage.qml | |
parent | 884a754ab44a95263fab13972433ae2d9327b45f (diff) |
Gallery: improve designer compatibility
Get rid of some unnecessary Math.min/max() calculations, and let the
controls just stay at their implicit size. As for the buttons, we can
use ColumnLayout + Layout.fillWidth to ensure that they all have the
same size.
Change-Id: Iaed29b330d7edc1f5d2c05d8815a559d52d52bcc
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'examples/quickcontrols2/gallery/pages/RangeSliderPage.qml')
-rw-r--r-- | examples/quickcontrols2/gallery/pages/RangeSliderPage.qml | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/examples/quickcontrols2/gallery/pages/RangeSliderPage.qml b/examples/quickcontrols2/gallery/pages/RangeSliderPage.qml index 6a74e348..629a788b 100644 --- a/examples/quickcontrols2/gallery/pages/RangeSliderPage.qml +++ b/examples/quickcontrols2/gallery/pages/RangeSliderPage.qml @@ -44,8 +44,6 @@ import QtQuick.Controls 2.1 ScrollablePage { id: page - readonly property int itemWidth: Math.max(slider.implicitWidth, Math.min(slider.implicitWidth * 2, page.availableWidth / 3)) - Column { spacing: 40 width: parent.width @@ -61,7 +59,6 @@ ScrollablePage { id: slider first.value: 0.25 second.value: 0.75 - width: itemWidth anchors.horizontalCenter: parent.horizontalCenter } @@ -69,7 +66,6 @@ ScrollablePage { orientation: Qt.Vertical first.value: 0.25 second.value: 0.75 - height: itemWidth anchors.horizontalCenter: parent.horizontalCenter } } |