Repository navigation
Conversation
The tray widget permanently occupied its fully-expanded drawer footprint on the bar (omacom#13182). Co-authored-by: AnPod <AnPod@users.noreply.github.com>
70ed634 to
6dc987b
Compare
|
Reviewed at 6dc987b and reproduced on a disposable Omarchy VM with the shell loaded from each tree and two tray items registered. On One visible change beyond the fix: when the drawer is open, the icons now sit to the left of the chevron (above it on a vertical bar), where before the chevron came first and the icons followed it. That comes from keeping the chevron still while the drawer opens. The gap could also be closed with the old order kept, by leaving the chevron at the start of the block and growing the clip after it, so which arrangement to ship is the maintainer's call. It is not a defect. Codex Medium reviewed it as a second opinion and found no defect. It checked hover across left, center and right placements and found nothing that would make the drawer open and close in a loop as the widget resizes. It also confirmed that collapsed icons take no clicks, because their clip is zero-width. It agreed with the ordering note above, which was already in its brief, so that part is agreement and independence is not guaranteed. #13636 makes the same change to |
Brings the fix across the tray drawer section from omacom#15281: the drawer block keeps quattro's hasDrawer guard, so a tray holding only bar widgets still gets one, and reserves only the revealed extent as before.
|
This stopped merging cleanly after #15281 landed on The merge was checked again on a disposable Omarchy VM with the shell loaded from each tree and two tray items registered. On No second opinion ran on this revision. The reviewer, Codex Medium, was reachable, but omabot's daily review budget was already spent, so this check is one model's alone. The branch keeps |
|
| // Only reserve the chevron plus the currently revealed drawer width so a | ||
| // collapsed tray does not permanently occupy its fully-expanded footprint | ||
| // on the bar (#13182). | ||
| readonly property int drawerBlockWidth: root.hasDrawer ? expandIcon.implicitWidth + Math.round(root.revealExtent) : 0 |
There was a problem hiding this comment.
The changed drawer layout has no regression test. tray-test.sh only checks TrayModel.js helpers, so it passes even if the collapsed drawer reserves extra space or the chevron overlaps an icon. Add checks for collapsed, partly revealed, and fully open states in both orientations, including pinned items.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
|
This stopped merging cleanly again, and this time I have not ported it. I checked this on a disposable Omarchy VM, with the shell loaded from Codex Medium also reviewed it, reading the source only. It agreed that The decision is the maintainer's: this pull request and #13182 look ready to close as fixed by #15517. Thank you for the precise report and fix, @AnPod. The measurement in #13182 is what made this quick to confirm. |
|
Closing in favor of my older PR #13636, which carries the same fix. |
Summary
omarchy.traypermanently occupied its fully-expanded drawer footprint on the bar (expandIcon.implicitWidth + root.drawerExtent), leaving empty dead space on the bar while collapsed (#13182).This updates
drawerBlockWidth(and verticaldrawerBlockHeight) to derive fromMath.round(root.revealExtent)rather than the static full extent, pinning the chevron to the right/bottom edge of the growing drawer block so the collapsed tray occupies only its visible width.Fixes #13182
Testing
bash test/shell.d/tray-test.sh(all 9 assertions pass).