fix styling on web titlebar style

This commit is contained in:
jeffvli 2025-06-24 20:14:15 -07:00
parent c84dd648ea
commit 8598313d12
4 changed files with 29 additions and 36 deletions

View file

@ -4,12 +4,10 @@ import { useRef } from 'react';
import { PlayQueueListControls } from './play-queue-list-controls'; import { PlayQueueListControls } from './play-queue-list-controls';
import { PageHeader } from '/@/renderer/components/page-header/page-header';
import { VirtualGridContainer } from '/@/renderer/components/virtual-grid'; import { VirtualGridContainer } from '/@/renderer/components/virtual-grid';
import { PlayQueue } from '/@/renderer/features/now-playing/components/play-queue'; import { PlayQueue } from '/@/renderer/features/now-playing/components/play-queue';
import { useWindowSettings } from '/@/renderer/store/settings.store'; import { useWindowSettings } from '/@/renderer/store/settings.store';
import { Box } from '/@/shared/components/box/box'; import { Box } from '/@/shared/components/box/box';
import { Stack } from '/@/shared/components/stack/stack';
import { Song } from '/@/shared/types/domain-types'; import { Song } from '/@/shared/types/domain-types';
import { Platform } from '/@/shared/types/types'; import { Platform } from '/@/shared/types/types';
@ -20,14 +18,9 @@ export const SidebarPlayQueue = () => {
const isWeb = windowBarStyle === Platform.WEB; const isWeb = windowBarStyle === Platform.WEB;
return ( return (
<VirtualGridContainer> <VirtualGridContainer>
{isWeb && (
<Stack mr={isWeb ? '130px' : undefined}>
<PageHeader />
</Stack>
)}
<Box <Box
display={!isWeb ? 'flex' : undefined} display={!isWeb ? 'flex' : undefined}
h={!isWeb ? '65px' : undefined} h="65px"
> >
<PlayQueueListControls <PlayQueueListControls
tableRef={queueRef} tableRef={queueRef}

View file

@ -3,6 +3,7 @@
width: 130px; width: 130px;
height: 100%; height: 100%;
-webkit-app-region: no-drag; -webkit-app-region: no-drag;
background-color: var(--theme-colors-background);
} }
.windows-button { .windows-button {
@ -25,5 +26,7 @@
} }
.windows-button.exit-button { .windows-button.exit-button {
&:hover {
background: var(--theme-colors-state-error); background: var(--theme-colors-state-error);
}
} }

View file

@ -7,10 +7,6 @@ import styles from './window-controls.module.css';
const browser = isElectron() ? window.api.browser : null; const browser = isElectron() ? window.api.browser : null;
interface WindowControlsProps {
style?: 'linux' | 'macos' | 'windows';
}
const close = () => browser?.exit(); const close = () => browser?.exit();
const minimize = () => browser?.minimize(); const minimize = () => browser?.minimize();
@ -19,7 +15,7 @@ const maximize = () => browser?.maximize();
const unmaximize = () => browser?.unmaximize(); const unmaximize = () => browser?.unmaximize();
export const WindowControls = ({ style }: WindowControlsProps) => { export const WindowControls = () => {
const [max, setMax] = useState(false); const [max, setMax] = useState(false);
const handleMinimize = () => minimize(); const handleMinimize = () => minimize();
@ -39,15 +35,16 @@ export const WindowControls = ({ style }: WindowControlsProps) => {
<> <>
{isElectron() && ( {isElectron() && (
<> <>
{style === 'windows' && (
<div className={styles.windowsButtonGroup}> <div className={styles.windowsButtonGroup}>
<div <div
className={styles.windowsButton}
onClick={handleMinimize} onClick={handleMinimize}
role="button" role="button"
> >
<RiSubtractLine size={19} /> <RiSubtractLine size={19} />
</div> </div>
<div <div
className={styles.windowsButton}
onClick={handleMaximize} onClick={handleMaximize}
role="button" role="button"
> >
@ -61,7 +58,6 @@ export const WindowControls = ({ style }: WindowControlsProps) => {
<RiCloseLine size={19} /> <RiCloseLine size={19} />
</div> </div>
</div> </div>
)}
</> </>
)} )}
</> </>

View file

@ -321,6 +321,7 @@ button {
} }
.ag-header { .ag-header {
width: auto;
border-bottom: 2px solid var(--theme-colors-border); border-bottom: 2px solid var(--theme-colors-border);
} }