mirror of
https://github.com/Psychotoxical/psysonic.git
synced 2026-07-21 23:05:46 +00:00
fix(titlebar): window drag, resize grips and mobile-mode grid for custom titlebar
- Add core:window:allow-start-dragging capability so data-tauri-drag-region actually works (was silently blocked without this permission) - Add CSS resize grips (bottom-left + bottom-right) that replace the native GTK grip lost when decorations: false - Add [data-mobile][data-titlebar] grid override so the titlebar renders correctly in narrow-window mode instead of being hidden Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -34,6 +34,7 @@
|
|||||||
"core:window:allow-show",
|
"core:window:allow-show",
|
||||||
"core:window:allow-set-fullscreen",
|
"core:window:allow-set-fullscreen",
|
||||||
"core:window:allow-is-fullscreen",
|
"core:window:allow-is-fullscreen",
|
||||||
|
"core:window:allow-start-dragging",
|
||||||
"core:window:allow-create",
|
"core:window:allow-create",
|
||||||
"core:webview:allow-create-webview-window",
|
"core:webview:allow-create-webview-window",
|
||||||
"process:allow-restart"
|
"process:allow-restart"
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"default":{"identifier":"default","description":"Default capabilities for Psysonic","local":true,"windows":["main"],"permissions":["core:default","shell:default",{"identifier":"shell:allow-open","allow":[{"url":"https://**"}]},"global-shortcut:allow-register","global-shortcut:allow-unregister","store:default","store:allow-load","store:allow-set","store:allow-get","store:allow-save","dialog:default","dialog:allow-open","dialog:allow-save","fs:default","fs:allow-write-file","fs:allow-read-file","fs:allow-mkdir","fs:scope-download-recursive","fs:scope-home-recursive","window-state:allow-save-window-state","window-state:allow-restore-state","core:window:allow-set-title","core:window:allow-close","core:window:allow-minimize","core:window:allow-toggle-maximize","core:window:allow-hide","core:window:allow-show","core:window:allow-set-fullscreen","core:window:allow-is-fullscreen","core:window:allow-create","core:webview:allow-create-webview-window","process:allow-restart"],"platforms":["linux","macOS","windows"]}}
|
{"default":{"identifier":"default","description":"Default capabilities for Psysonic","local":true,"windows":["main"],"permissions":["core:default","shell:default",{"identifier":"shell:allow-open","allow":[{"url":"https://**"}]},"global-shortcut:allow-register","global-shortcut:allow-unregister","store:default","store:allow-load","store:allow-set","store:allow-get","store:allow-save","dialog:default","dialog:allow-open","dialog:allow-save","fs:default","fs:allow-write-file","fs:allow-read-file","fs:allow-mkdir","fs:scope-download-recursive","fs:scope-home-recursive","window-state:allow-save-window-state","window-state:allow-restore-state","core:window:allow-set-title","core:window:allow-close","core:window:allow-minimize","core:window:allow-toggle-maximize","core:window:allow-hide","core:window:allow-show","core:window:allow-set-fullscreen","core:window:allow-is-fullscreen","core:window:allow-start-dragging","core:window:allow-create","core:webview:allow-create-webview-window","process:allow-restart"],"platforms":["linux","macOS","windows"]}}
|
||||||
@@ -40,6 +40,23 @@
|
|||||||
"player player player";
|
"player player player";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Resize grips — replace the native GTK grips lost when decorations: false */
|
||||||
|
.app-shell[data-titlebar]::before,
|
||||||
|
.app-shell[data-titlebar]::after {
|
||||||
|
content: '';
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
width: 14px;
|
||||||
|
height: 14px;
|
||||||
|
pointer-events: none;
|
||||||
|
background-image: radial-gradient(circle, var(--text-muted) 1.5px, transparent 1.5px);
|
||||||
|
background-size: 4px 4px;
|
||||||
|
opacity: 0.35;
|
||||||
|
z-index: 9999;
|
||||||
|
}
|
||||||
|
.app-shell[data-titlebar]::before { left: 0; }
|
||||||
|
.app-shell[data-titlebar]::after { right: 0; }
|
||||||
|
|
||||||
.titlebar {
|
.titlebar {
|
||||||
grid-area: titlebar;
|
grid-area: titlebar;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -1563,6 +1580,15 @@
|
|||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.app-shell[data-mobile][data-titlebar] {
|
||||||
|
grid-template-rows: var(--titlebar-height) 1fr auto auto;
|
||||||
|
grid-template-areas:
|
||||||
|
"titlebar"
|
||||||
|
"main"
|
||||||
|
"bottomnav"
|
||||||
|
"player";
|
||||||
|
}
|
||||||
|
|
||||||
/* Hide the sidebar collapse button on mobile */
|
/* Hide the sidebar collapse button on mobile */
|
||||||
.app-shell[data-mobile] .collapse-btn {
|
.app-shell[data-mobile] .collapse-btn {
|
||||||
display: none;
|
display: none;
|
||||||
|
|||||||
Reference in New Issue
Block a user