c514e4faec
Track menu popup visibility and propagate zoom level to the popup. Add menu_popup_visible_ flag, SendMenuPopupZoom(), and call it when creating/showing the popup and when adjusting zoom. Make CreateNewTab accept an optional URL and route popup/new-tab flows to it. Prevent per-tab child closes from triggering app shutdown by tracking closing_tab_browsers_ and adding ForgetClosingTabBrowser(). Treat MenuPopup role specially when enabling frame hit-testing. Platform: remove usage of ApplyRoundedBrowserRegion and switch menu popup sizing to use resized client_size helpers (consolidate calculations across Win/Mac/Linux). UI: update menu-popup CSS/JS (new styling, font, zoom formatting API via NebulaMenuPopup.setZoomLevel), wire settings to use nebulaNative.postMessage for new-tab, and remove the static menu-popup.html. Misc: small chrome CSS/JS tweaks and ensure chrome state includes zoomLevel.
77 lines
1.4 KiB
CSS
77 lines
1.4 KiB
CSS
:root {
|
|
--surface-raised: #141824;
|
|
--surface-hover: rgba(255, 255, 255, 0.06);
|
|
--text: #e8e8f0;
|
|
--muted: #7a7e90;
|
|
--outline: #1f2533;
|
|
color-scheme: dark;
|
|
}
|
|
|
|
@font-face {
|
|
font-family: "InterVariable";
|
|
src: url("../assets/fonts/InterVariable.ttf") format("truetype");
|
|
font-weight: 100 900;
|
|
font-display: swap;
|
|
}
|
|
|
|
* { box-sizing: border-box; }
|
|
|
|
body {
|
|
margin: 0;
|
|
background: var(--surface-raised);
|
|
color: var(--text);
|
|
font-family: "InterVariable", "Segoe UI", system-ui, sans-serif;
|
|
overflow: hidden;
|
|
user-select: none;
|
|
}
|
|
|
|
#menu-popup {
|
|
width: 100%;
|
|
height: 100%;
|
|
background: var(--surface-raised);
|
|
border: 1px solid var(--outline);
|
|
border-radius: 12px;
|
|
padding: 6px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
|
|
}
|
|
|
|
#menu-popup button {
|
|
background: transparent;
|
|
border: none;
|
|
color: var(--text);
|
|
text-align: left;
|
|
padding: 8px 10px;
|
|
border-radius: 8px;
|
|
cursor: pointer;
|
|
font: inherit;
|
|
font-size: 0.84rem;
|
|
transition: background 120ms ease;
|
|
}
|
|
|
|
#menu-popup button:hover {
|
|
background: var(--surface-hover);
|
|
}
|
|
|
|
.zoom-controls {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 8px;
|
|
padding: 6px 8px;
|
|
}
|
|
|
|
.zoom-controls button {
|
|
width: 28px;
|
|
height: 28px;
|
|
text-align: center;
|
|
}
|
|
|
|
#zoom-percent {
|
|
min-width: 54px;
|
|
text-align: center;
|
|
color: var(--muted);
|
|
font-size: 0.82rem;
|
|
}
|