mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-28 12:11:53 +01:00
Fix double-click-maximize and backdrop
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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',
|
||||
)}
|
||||
/>
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ export class YaakColor {
|
||||
const h = this.hue;
|
||||
const s = this.saturation;
|
||||
const l = this.lightness;
|
||||
const a = this.alpha; // Convert from 0-1 to 0-255
|
||||
const a = this.alpha;
|
||||
|
||||
const [r, g, b] = parseColor(`hsl(${h},${s}%,${l}%)`).rgb;
|
||||
return rgbaToHex(r, g, b, a);
|
||||
|
||||
Reference in New Issue
Block a user