mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-24 02:11:10 +01:00
Ignore stoplights when centering settings title
This commit is contained in:
@@ -6,12 +6,19 @@ import { useOsInfo } from '../hooks/useOsInfo';
|
||||
interface HeaderSizeProps extends HTMLAttributes<HTMLDivElement> {
|
||||
children?: ReactNode;
|
||||
size: 'md' | 'lg';
|
||||
ignoreStoplights?: boolean;
|
||||
}
|
||||
|
||||
export function HeaderSize({ className, style, size, ...props }: HeaderSizeProps) {
|
||||
export function HeaderSize({
|
||||
className,
|
||||
style,
|
||||
size,
|
||||
ignoreStoplights,
|
||||
...props
|
||||
}: HeaderSizeProps) {
|
||||
const platform = useOsInfo();
|
||||
const fullscreen = useIsFullscreen();
|
||||
const stoplightsVisible = platform?.osType === 'macos' && !fullscreen;
|
||||
const stoplightsVisible = platform?.osType === 'macos' && !fullscreen && !ignoreStoplights;
|
||||
return (
|
||||
<div
|
||||
data-tauri-drag-region
|
||||
|
||||
Reference in New Issue
Block a user