made window dragable
This commit is contained in:
@@ -86,5 +86,3 @@ typings/
|
||||
site-history.json
|
||||
bookmarks.json
|
||||
bookmarks.backup.json
|
||||
bookmarks.json
|
||||
bookmarks.backup.json
|
||||
|
||||
@@ -120,7 +120,7 @@ function createWindow(startUrl) {
|
||||
// draggable region via CSS (-webkit-app-region: drag).
|
||||
Object.assign(windowOptions, {
|
||||
frame: true,
|
||||
titleBarStyle: 'hidden',
|
||||
titleBarStyle: 'hiddenInset',
|
||||
trafficLightPosition: { x: 15, y: 20 },
|
||||
// Transparent background so renderer chrome blends with content.
|
||||
backgroundColor: '#00000000',
|
||||
|
||||
@@ -73,6 +73,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="webviews" class="hidden"></div>
|
||||
|
||||
+4
-12
@@ -56,7 +56,8 @@ html, body {
|
||||
scrollbar-width: thin; /* slimmer track */
|
||||
-webkit-backdrop-filter: blur(var(--blur));
|
||||
backdrop-filter: blur(var(--blur));
|
||||
-webkit-app-region: no-drag; /* ensure HTML5 DnD works inside tab strip */
|
||||
/* Only the background areas are draggable. Individual tabs opt-out via no-drag. */
|
||||
-webkit-app-region: drag;
|
||||
}
|
||||
|
||||
/* NAVBAR LAYOUT */
|
||||
@@ -80,17 +81,8 @@ html, body {
|
||||
/* Make the top nav a draggable region on macOS when we use a hidden titlebar.
|
||||
Interactive controls inside must opt-out with -webkit-app-region: no-drag. */
|
||||
@supports (-webkit-app-region: drag) {
|
||||
/* Make both the tab strip and the nav area draggable so users have a
|
||||
larger region to click-and-drag the window. Keep interactive elements
|
||||
marked as no-drag so buttons and tabs remain clickable. */
|
||||
/* Keep only the nav area as a window-drag region so tabs can use HTML5 DnD */
|
||||
#nav {
|
||||
-webkit-app-region: drag;
|
||||
user-select: none;
|
||||
/* keep the appearance consistent even if transparent window behind it */
|
||||
background: rgba(20,22,30,0.72);
|
||||
backdrop-filter: blur(var(--blur));
|
||||
}
|
||||
/* Make the top nav a draggable region, but only in its background/gaps. */
|
||||
#nav { -webkit-app-region: drag; user-select: none; }
|
||||
|
||||
/* Interactive controls must explicitly opt-out of dragging. This keeps
|
||||
the larger draggable area while preserving normal click behavior. */
|
||||
|
||||
Reference in New Issue
Block a user