fix slider inset icons initial position
Python / lint-format (pull_request) Failing after 2m25s
Lint & Format (JS/TS) / lint-format (pull_request) Successful in 3m14s
Python / test (pull_request) Successful in 3m55s
Lint & Format (Rust) / lint-format (pull_request) Successful in 4m49s

This commit is contained in:
2026-06-15 19:20:02 +02:00
parent 578a10c950
commit eafffdcc8f
+4 -2
View File
@@ -91,7 +91,7 @@ Slider {
MaterialIcon {
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
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 {
id: posBinding