Keep the center hover reveal honest when panels hand off
Claiming the shared suppression flag before showing meant the outgoing panel's close cleared it again, leaving the incoming panel open with the indicators still revealed. Guarding the clear instead only moved the problem: handing off to a panel that does not manage the flag left it stuck on, and the center indicators stopped revealing on hover for good. Claim it after the handoff instead. The panel taking over always wins, and a handoff to a panel that knows nothing about the flag still leaves it cleared. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
e2d655d265
commit
c619865432
@@ -115,7 +115,8 @@ assert(!/property bool onToday/.test(panelSource) && !/root\.onToday/.test(panel
|
||||
assert(/readonly property bool viewingCurrentMonth:/.test(panelSource), 'calendar panel tracks whether the current month is on screen')
|
||||
assert(!/MouseArea/.test(panelSource.slice(panelSource.indexOf('model: modelData.days'), panelSource.indexOf('// Hairline'))), 'calendar day cells are not selectable')
|
||||
assert(/yearDone: Model\.yearProgress\(today\./.test(panelSource), 'calendar year bar stays pinned to today while months are stepped')
|
||||
assert(/if \(!root\.popoutSwitchClosing\) setCenterHoverRevealSuppressed\(false\)/.test(panelSource), 'calendar leaves the shared hover-reveal flag alone when another panel takes over')
|
||||
assert(/Qt\.callLater\(function\(\) \{\s*\n\s*if \(root\.opened\) setCenterHoverRevealSuppressed\(true\)/.test(panelSource), 'calendar claims the shared hover-reveal flag after the popout handoff, so the panel taking over wins')
|
||||
assert(/function close\(\) \{\s*\n\s*setCenterHoverRevealSuppressed\(false\)/.test(panelSource), 'calendar always releases the shared hover-reveal flag on close')
|
||||
assert(/width: Math\.max\(calendarScroll\.width, gridColumn\.width\)/.test(panelSource), 'calendar scrolls rather than clipping the grid on a narrow popup')
|
||||
assert(/enabled: !root\.viewingCurrentMonth/.test(panelSource) && /onClicked: root\.goToToday\(\)/.test(panelSource), 'calendar hero returns to today once the view has stepped away')
|
||||
assert(!/clampMonth/.test(panelSource), 'calendar steps freely into future months')
|
||||
|
||||
@@ -136,8 +136,8 @@ assert(
|
||||
'weather widget forwards the popout-switch handshake'
|
||||
)
|
||||
assert(
|
||||
panelSource.includes('if (!root.popoutSwitchClosing) setCenterHoverRevealSuppressed(false)'),
|
||||
'weather leaves the shared hover-reveal flag alone when another panel takes over'
|
||||
/Qt\.callLater\(function\(\) \{\s*\n\s*if \(root\.opened\) setCenterHoverRevealSuppressed\(true\)/.test(panelSource),
|
||||
'weather claims the shared hover-reveal flag after the popout handoff, so the panel taking over wins'
|
||||
)
|
||||
|
||||
assert(
|
||||
|
||||
Reference in New Issue
Block a user