fix slider inset icons initial position
This commit is contained in:
@@ -91,7 +91,7 @@ Slider {
|
|||||||
MaterialIcon {
|
MaterialIcon {
|
||||||
id: inset
|
id: inset
|
||||||
|
|
||||||
readonly property bool attached: root.filledWidth < (inset.paintedWidth + Appearance.spacing.extraSmall * 2)
|
readonly property bool attached: root.width ? (root.width - handle.implicitWidth - handle.anchors.leftMargin) * root.pos < inset.paintedWidth + Appearance.spacing.extraSmall * 2 : false
|
||||||
property real dockT: attached ? 1 : 0
|
property real dockT: attached ? 1 : 0
|
||||||
|
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
@@ -157,7 +157,9 @@ Slider {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Component.onCompleted: filledWidth = Qt.binding(() => (width - handle.implicitWidth - handle.anchors.leftMargin) * pos)
|
Component.onCompleted: {
|
||||||
|
filledWidth = Qt.binding(() => (width - handle.implicitWidth - handle.anchors.leftMargin) * pos);
|
||||||
|
}
|
||||||
|
|
||||||
Binding {
|
Binding {
|
||||||
id: posBinding
|
id: posBinding
|
||||||
|
|||||||
Reference in New Issue
Block a user