summaryrefslogtreecommitdiff
path: root/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/RealSliderPopup.qml
diff options
context:
space:
mode:
Diffstat (limited to 'share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/RealSliderPopup.qml')
-rw-r--r--share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/RealSliderPopup.qml38
1 files changed, 20 insertions, 18 deletions
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/RealSliderPopup.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/RealSliderPopup.qml
index 60b20b4238..38ea960b88 100644
--- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/RealSliderPopup.qml
+++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/RealSliderPopup.qml
@@ -1,14 +1,16 @@
-// Copyright (C) 2021 The Qt Company Ltd.
+// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
-import QtQuick 2.15
-import QtQuick.Templates 2.15 as T
+import QtQuick
+import QtQuick.Templates as T
import StudioTheme 1.0 as StudioTheme
T.Popup {
- id: sliderPopup
+ id: control
- property T.Control myControl
+ property StudioTheme.ControlStyle style: StudioTheme.Values.controlStyle
+
+ property T.Control __parentControl
property bool drag: slider.pressed
@@ -18,7 +20,7 @@ T.Popup {
| T.Popup.CloseOnReleaseOutsideParent
background: Rectangle {
- color: StudioTheme.Values.themePopupBackground
+ color: control.style.popup.background
border.width: 0
}
@@ -31,41 +33,41 @@ T.Popup {
rightPadding: 3
leftPadding: 3
- from: myControl.realFrom
- value: myControl.realValue
- to: myControl.realTo
+ from: control.__parentControl.realFrom
+ value: control.__parentControl.realValue
+ to: control.__parentControl.realTo
focusPolicy: Qt.NoFocus
handle: Rectangle {
x: slider.leftPadding + slider.visualPosition * (slider.availableWidth - width)
y: slider.topPadding + (slider.availableHeight / 2) - (height / 2)
- width: StudioTheme.Values.sliderHandleWidth
- height: StudioTheme.Values.sliderHandleHeight
+ width: control.style.sliderHandleSize.width
+ height: control.style.sliderHandleSize.height
radius: 0
- color: slider.pressed ? StudioTheme.Values.themeSliderHandleInteraction
- : StudioTheme.Values.themeSliderHandle
+ color: slider.pressed ? control.style.slider.handleInteraction
+ : control.style.slider.handle
}
background: Rectangle {
x: slider.leftPadding
y: slider.topPadding + (slider.availableHeight / 2) - (height / 2)
width: slider.availableWidth
- height: StudioTheme.Values.sliderTrackHeight
+ height: control.style.sliderTrackHeight
radius: 0
- color: StudioTheme.Values.themeSliderInactiveTrack
+ color: control.style.slider.inactiveTrack
Rectangle {
width: slider.visualPosition * parent.width
height: parent.height
- color: StudioTheme.Values.themeSliderActiveTrack
+ color: control.style.slider.activeTrack
radius: 0
}
}
onMoved: {
- myControl.realValue = slider.value
- myControl.realValueModified()
+ control.__parentControl.realValue = slider.value
+ control.__parentControl.realValueModified()
}
}
}