Keep window controls outside drag region
All checks were successful
Build Windows App / build-windows (push) Successful in 19m2s
All checks were successful
Build Windows App / build-windows (push) Successful in 19m2s
This commit is contained in:
@@ -331,9 +331,11 @@ export default function App() {
|
|||||||
return (
|
return (
|
||||||
<main className="appShell">
|
<main className="appShell">
|
||||||
<section className="titlebar">
|
<section className="titlebar">
|
||||||
<div className="titlebarBrand">
|
<div className="titlebarDrag">
|
||||||
<div className="titlebarMark">EH</div>
|
<div className="titlebarBrand">
|
||||||
<span>EnvHelper</span>
|
<div className="titlebarMark">EH</div>
|
||||||
|
<span>EnvHelper</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="windowControls">
|
<div className="windowControls">
|
||||||
<button aria-label="Minimize" onClick={() => window.envHelper?.minimizeWindow()} title="Minimize" type="button">
|
<button aria-label="Minimize" onClick={() => window.envHelper?.minimizeWindow()} title="Minimize" type="button">
|
||||||
|
|||||||
@@ -147,7 +147,6 @@ textarea:focus {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.titlebar {
|
.titlebar {
|
||||||
-webkit-app-region: drag;
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background: color-mix(in srgb, var(--surface) 92%, var(--bg));
|
background: color-mix(in srgb, var(--surface) 92%, var(--bg));
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
@@ -157,6 +156,15 @@ textarea:focus {
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.titlebarDrag {
|
||||||
|
-webkit-app-region: drag;
|
||||||
|
align-items: center;
|
||||||
|
display: flex;
|
||||||
|
flex: 1;
|
||||||
|
height: 100%;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.titlebarBrand {
|
.titlebarBrand {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
color: var(--muted);
|
color: var(--muted);
|
||||||
@@ -186,9 +194,12 @@ textarea:focus {
|
|||||||
display: flex;
|
display: flex;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
padding: 3px;
|
padding: 3px;
|
||||||
|
position: relative;
|
||||||
|
z-index: 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
.windowControls button {
|
.windowControls button {
|
||||||
|
-webkit-app-region: no-drag;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
border: 1px solid transparent;
|
border: 1px solid transparent;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
|
|||||||
Reference in New Issue
Block a user