Skip to content

QuickPanel: Improve documentation using inline comments. #211

@moWerk

Description

@moWerk

Having worked through the PR (and prior discussion in DM) again, it became apparent to me that the QuickPanel needs better documentation to improve maintainability.
I am merging this and open a follow up issue.

Starting here with a more thorough explanation of the 3 key changes in this PR:

first issue was state ownership in QuickPanelToggle. old code keppt toggled internally and fired checked/unchecked signals, which meant we needed Component.onCompleted plus a Connections block just to stay in synnc with the real system state. I just did not know better when implementing this. dodo makes checked a plain property the caller binds directly to the sourc. the toggle has no knowledge about state, half the Connections blocks in QuickPanel just disappear.


Second is the actual animation bug i introduced. value on the ValueMeter was a live binding, so the moment showingBrightness flipped, the fill width jumped immediately in the same pass before the fade out had any time to run. The animate flag only controlled opacity, it couldn't see the value change. dodo replaces it with a proper neat QML state machine and SequentialAnimation in the transitions block which only fires the PropertyChanges until after the fade out step completes.Tthat is the ordering guarantee the flag pattern was trying to fake.


Third fix is smaller, the directionChangeTimer had running: pressed && isAtEnd as a binding where isAtEnd depended on rangeValue which was being going wild inside the timer itself. Which was a binding loop "risk", replaced with explicit start/stop calls at known points.

Originally posted by @moWerk in #208 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions