App menu: the titlebar logo opens it too, hung under the logo on its side of the window

The logo at the start of the titlebar is now a button (aria-haspopup, keyboard reachable, tooltip) and a second trigger of the same menu: same component and model, only the anchor differs (`openAppMenu({ anchor: 'logo' })`). A submenu opens toward the middle of the window, else on the other side, else over the menu (`submenuLeft`, tested). A click on the logo never starts a window drag; a press that moves more than 5px does (the window's `startDragging`), so the logo still moves the window like the titlebar around it. A right-click shows the window's system menu. Clear of the macOS traffic lights: the logo sits after the titlebar's 78px inset and the menu hangs below it. The button at the end and the account menu's row stay.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
CRTkafa 2026-09-30 22:15:09 +07:00
parent 632ba863c9
commit 9d9f0ab10a
9 changed files with 133 additions and 28 deletions

View file

@ -13,6 +13,18 @@
.bt-app-button:focus-visible { outline: 0; box-shadow: var(--bt-ring); }
.bt-shell .bt-app-button svg { width: 16px; height: 16px; fill: currentColor; stroke: none; }
/* The logo at the start of the titlebar: the menu's second trigger (a 30px target around the 20px
mark; with its margins it takes the 50px the tab strip leaves in --bt-tb-left). */
.bt-titlebar-logo {
align-self: center; display: inline-grid; place-items: center; width: 30px; height: 30px; flex: 0 0 30px; margin: 0 9px 0 11px; padding: 0; box-sizing: border-box; /* rtl-ok: titlebar */
border: 1px solid transparent; border-radius: 9px; background: transparent; cursor: pointer; -webkit-user-drag: none;
transition: background-color var(--bt-t1) var(--bt-ease), border-color var(--bt-t1) var(--bt-ease);
}
.bt-titlebar-logo img { display: block; width: 20px; height: 20px; pointer-events: none; -webkit-user-drag: none; }
.bt-titlebar-logo:hover { background: var(--bt-hover); border-color: var(--bt-line-soft); }
.bt-titlebar-logo[aria-expanded=true] { background: var(--bt-hover); border-color: rgb(var(--bt-accent-rgb) / .5); }
.bt-titlebar-logo:focus-visible { outline: 0; box-shadow: var(--bt-ring); }
/* The menu and its submenus. `display: contents`: the layers are positioned on their own. */
.bt-app-layers { display: contents; }
.bt-menu.bt-app-menu {
@ -24,7 +36,7 @@
width: max-content; min-width: 224px; max-width: min(320px, calc(100vw - 16px)); z-index: 1;
animation: bt-app-sub-in var(--bt-t1) var(--bt-ease-out);
}
@keyframes bt-app-sub-in { from { opacity: 0; transform: translateX(6px); } }
@keyframes bt-app-sub-in { from { opacity: 0; transform: translateX(var(--bt-app-sub-from, 6px)); } }
.bt-app-menu hr { flex: none; width: auto; align-self: stretch; }
/* Rows: one highlight, wherever it comes from (the pointer moves the focus, as the arrows do);