Fix double-click-maximize and backdrop

This commit is contained in:
Gregory Schier
2024-10-10 07:11:43 -07:00
parent 250625fc0e
commit f974a66086
6 changed files with 3126 additions and 4705 deletions

View File

@@ -1,4 +1,3 @@
import { getCurrentWebviewWindow } from '@tauri-apps/api/webviewWindow';
import classNames from 'classnames';
import type { HTMLAttributes, ReactNode } from 'react';
import React from 'react';
@@ -29,10 +28,6 @@ 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)

View File

@@ -44,7 +44,7 @@ export function Overlay({
onClick={onClose}
className={classNames(
'absolute inset-0',
variant === 'default' && 'bg-surface-backdrop backdrop-blur-sm',
variant === 'default' && 'bg-backdrop backdrop-blur-sm',
)}
/>