Stop lists and sliders from losing input under the user
WifiList and the notification toasts built their model from a plain computed array, so any background property tick (a scan result, an unrelated notification arriving) reassigned the whole array and the Repeater destroyed and recreated every delegate -- including one with an open, focused password field or an in-progress reply. Switched both to a ScriptModel, which diffs by identity instead of resetting. ValueSlider had its pointer-to-value mapping offset by 16px (the hit-area margin was applied with the wrong sign), so 0% was unreachable and every click landed to the right of where it was placed -- affects every slider in the shell. SliderRow used -1 as a sentinel for "nothing pending," which collides with legitimate negative preference values like pointer sensitivity. Dock intellihide read the globally focused workspace instead of each monitor's own, so an empty workspace on one screen could hide the dock on another; ActivityPanel rebuilt every row once a second during a recording because the elapsed-time read lived in the model construction instead of each row's own binding. Claude-Session: https://claude.ai/code/session_01E6TJUAh41HaP25MVHWkhRZ
This commit is contained in:
@@ -103,7 +103,12 @@ Item {
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
|
||||
function apply(mouseX) {
|
||||
const ratio = Math.max(0, Math.min(1, (mouseX + 8) / track.width));
|
||||
// mouseX is local to this MouseArea, whose anchors.margins: -8
|
||||
// pushes its own origin 8px before the track's left edge. So
|
||||
// MouseArea-local x=8 is track-local x=0 -- subtract the
|
||||
// margin to land back in the track's own coordinate space
|
||||
// before turning it into a fraction.
|
||||
const ratio = Math.max(0, Math.min(1, (mouseX - 8) / track.width));
|
||||
root.moved(ratio);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user