mirror of
https://github.com/SableClient/Sable.git
synced 2026-11-20 17:11:17 -08:00
fix make it not look weird on thin pc monitors
Signed-off-by: Shea <[email protected]>
This commit is contained in:
1 file changed
+5
-2
@@ -7,7 +7,7 @@ import { SettingsTab } from './SettingsTab';
|
||||
import { useAtom } from 'jotai';
|
||||
import { isResizingSidebarAtom } from '$state/isResizingSidebar';
|
||||
import * as css from './UserQuickTools.css';
|
||||
import { mobileOrTablet } from '$utils/user-agent';
|
||||
import { ScreenSize, useScreenSizeContext } from '$hooks/useScreenSize';
|
||||
|
||||
export function UserQuickTools({
|
||||
width,
|
||||
@@ -20,6 +20,9 @@ export function UserQuickTools({
|
||||
const underOutstep = width < 190 + 66;
|
||||
const isCollapsed = width < 50 + 66;
|
||||
|
||||
const screenSize = useScreenSizeContext();
|
||||
const compact = screenSize === ScreenSize.Mobile;
|
||||
|
||||
return (
|
||||
<>
|
||||
{/* Doing it properly and nicely would require a major rewrite that would cause more trouble*/}
|
||||
@@ -31,7 +34,7 @@ export function UserQuickTools({
|
||||
style={{
|
||||
opacity: isResizingSidebar ? '0%' : '100%',
|
||||
transition: isResizingSidebar ? 'opacity 0.2s ease' : 'opacity 0.5s ease',
|
||||
width: mobileOrTablet() ? '100%' : toRem(width),
|
||||
width: compact ? '100%' : toRem(width),
|
||||
paddingRight: underOutstep ? config.space.S200 : config.space.S300,
|
||||
}}
|
||||
>
|
||||
|
||||
Reference in new issue
Block a user