fix(ui): make titlebar window buttons clickable
cx
This commit is contained in:
1 parent
3ac957ddda
commit
150513179d
1 file changed
+6
-3
@@ -44,17 +44,18 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
||||||
<header class="titlebar" data-tauri-drag-region ondblclick={handleDoubleClick}>
|
<header class="titlebar" ondblclick={handleDoubleClick}>
|
||||||
<!-- Drag region - uses both data-tauri-drag-region and CSS app-region: drag -->
|
<!-- Drag region only (avoid marking the whole header as draggable so buttons remain clickable) -->
|
||||||
<div class="drag-region" data-tauri-drag-region></div>
|
<div class="drag-region" data-tauri-drag-region></div>
|
||||||
|
|
||||||
<!-- Window Controls -->
|
<!-- Window Controls -->
|
||||||
<div class="window-controls">
|
<div class="window-controls" data-tauri-drag-region="false">
|
||||||
<button
|
<button
|
||||||
class="control-btn minimize"
|
class="control-btn minimize"
|
||||||
onclick={handleMinimize}
|
onclick={handleMinimize}
|
||||||
title="Minimize"
|
title="Minimize"
|
||||||
aria-label="Minimize window"
|
aria-label="Minimize window"
|
||||||
|
data-tauri-drag-region="false"
|
||||||
>
|
>
|
||||||
<Minus size={16} strokeWidth={1.5} />
|
<Minus size={16} strokeWidth={1.5} />
|
||||||
</button>
|
</button>
|
||||||
@@ -63,6 +64,7 @@
|
|||||||
onclick={handleMaximize}
|
onclick={handleMaximize}
|
||||||
title={isMaximized ? "Restore" : "Maximize"}
|
title={isMaximized ? "Restore" : "Maximize"}
|
||||||
aria-label={isMaximized ? "Restore window" : "Maximize window"}
|
aria-label={isMaximized ? "Restore window" : "Maximize window"}
|
||||||
|
data-tauri-drag-region="false"
|
||||||
>
|
>
|
||||||
{#if isMaximized}
|
{#if isMaximized}
|
||||||
<Minimize2 size={14} strokeWidth={1.5} />
|
<Minimize2 size={14} strokeWidth={1.5} />
|
||||||
@@ -75,6 +77,7 @@
|
|||||||
onclick={handleClose}
|
onclick={handleClose}
|
||||||
title="Close"
|
title="Close"
|
||||||
aria-label="Close window"
|
aria-label="Close window"
|
||||||
|
data-tauri-drag-region="false"
|
||||||
>
|
>
|
||||||
<X size={16} strokeWidth={1.5} />
|
<X size={16} strokeWidth={1.5} />
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
Reference in new issue
Block a user