-
feat(midiviz): an X that closes it, a [x] that pins it, and a close that sticks · 46709b26
PLN: "needs basic menu or at least top right X to close, and its too sticky atm if i close i wanna close it i guess maybe X and a [x] where x goes and comes and is the 'stick above' feature, but it anyway is all desks always." No menu -- two glyph targets in the header's right edge, in the same micro font as everything else: "[x]" toggles always-on-top (the x IS the state) and "X" closes. Dim by default, brighter under the pointer, which is the only affordance a frameless window can offer. T toggles the pin from the keyboard; Q and Escape already closed it and still do. Controls win over the drag. The whole surface is a drag handle, so without an explicit hit-test first the X would only ever have moved the window. Targets are laid out from the right edge with the glyphs centred inside them, not sized to fit the glyphs. Sizing to the glyph gave an 8px-wide X -- measured -- which is fine to look at and unhittable mid-set, and at 0.6 scale the two targets then had to either overlap or shrink below usable. Deciding targets first makes "disjoint and at least 18px" true by construction at every zoom, asserted across four scales and three widths. All-desktops is deliberately untouched: it is a KWin rule keyed on the app id, it is unconditional as PLN said, and toggling the pin must not disturb it. THE STICKINESS WAS NOT THE WINDOW. A clean exit is not a failure so systemd never restarted it -- but rig_units.ensure() starts every non-manual unit that is not active, and both gig-up and the Bridge watcher converge, so the lens came straight back with nothing in the output admitting why. Marking the unit "manual" would have answered the complaint by deleting the feature he asked for last week. So a deliberate close is recorded in $XDG_RUNTIME_DIR, ensure() honours the latch and says so, and anything that starts the lens on purpose clears it. That directory is wiped at logout, which is exactly the right lifetime: "always open" is about how a session starts, "closed means closed" is about what happens after he acts, and the two only looked contradictory. Closed for this session, back at next login, no state to remember to undo. Only a close the human asked for latches -- a compositor teardown is not an opinion. The latch path is a contract between three files that deliberately do not import each other, so a test asserts they agree rather than trusting three copies of an f-string. That test immediately earned its keep: rig_units.py used Path without importing it, on a line only reached once a latch existed. Also fixes a shadow of my own making: the new painter was called _paint_chrome, which is already a method on this widget, so it silently replaced the window-chrome painter and the selftest died on the signature. Renamed _paint_controls.
PLN (Algolia) authored46709b26
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| tests | Loading commit data... | |
| ui | Loading commit data... | |
| .gitignore | Loading commit data... | |
| README.md | Loading commit data... | |
| bridge.py | Loading commit data... | |
| gearbox.py | Loading commit data... | |
| launchers.py | Loading commit data... | |
| midimon.py | Loading commit data... | |
| midistream.py | Loading commit data... | |
| midiviz.py | Loading commit data... | |
| parvagues-bridge.desktop | Loading commit data... | |
| parvagues-bridge.service | Loading commit data... | |
| perf.py | Loading commit data... | |
| rig.py | Loading commit data... | |
| server.py | Loading commit data... | |
| surface.py | Loading commit data... |