From eafffdcc8fee2b062e9080fd56478438cf8a8366 Mon Sep 17 00:00:00 2001 From: zach Date: Mon, 15 Jun 2026 19:20:02 +0200 Subject: [PATCH] fix slider inset icons initial position --- Components/CustomSlider.qml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Components/CustomSlider.qml b/Components/CustomSlider.qml index 6e5f656..f7be430 100644 --- a/Components/CustomSlider.qml +++ b/Components/CustomSlider.qml @@ -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