mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-17 23:14:03 +01:00
Maximize window on header double-click
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { getCurrentWebviewWindow } from '@tauri-apps/api/webviewWindow';
|
||||
import classNames from 'classnames';
|
||||
import type { HTMLAttributes, ReactNode } from 'react';
|
||||
import { useIsFullscreen } from '../hooks/useIsFullscreen';
|
||||
@@ -24,6 +25,10 @@ export function HeaderSize({
|
||||
return (
|
||||
<div
|
||||
data-tauri-drag-region
|
||||
onDoubleClick={async () => {
|
||||
// Maximize window on double-click
|
||||
await getCurrentWebviewWindow().toggleMaximize();
|
||||
}}
|
||||
style={{
|
||||
...style,
|
||||
// Add padding for macOS stoplights, but keep it the same width (account for the interface scale)
|
||||
|
||||
Reference in New Issue
Block a user