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