fix(ags overview): make empty workspaces a fixed width
All checks were successful
Discord / discord commits (push) Has been skipped

This commit is contained in:
matt1432 2024-01-15 16:04:09 -05:00
parent 181a9d3a73
commit 86e37578c7
2 changed files with 5 additions and 3 deletions

View file

@ -39,7 +39,7 @@ export const updateCurrentWorkspace = (main: AgsBox, highlighter: AgsBox) => {
const currentIndex = workspaces.findIndex( const currentIndex = workspaces.findIndex(
(w) => w.attribute.id === currentId, (w) => w.attribute.id === currentId,
); );
const left = currentIndex * ((VARS.SCREEN.X * VARS.SCALE) + PADDING); const left = currentIndex * ((VARS.SCREEN.X * VARS.SCALE) + 2 + PADDING);
const height = row * ((VARS.SCREEN.Y * VARS.SCALE) + (PADDING / 2)); const height = row * ((VARS.SCREEN.Y * VARS.SCALE) + (PADDING / 2));
highlighter.setCss(` highlighter.setCss(`

View file

@ -5,8 +5,9 @@ import { Revealer, CenterBox, Box, EventBox, Fixed, Label } from 'resource:///co
import { WorkspaceDrop } from './dragndrop.ts'; import { WorkspaceDrop } from './dragndrop.ts';
import * as VARS from './variables.ts'; import * as VARS from './variables.ts';
const EMPTY_OFFSET = 16;
const DEFAULT_STYLE = ` const DEFAULT_STYLE = `
min-width: ${VARS.SCREEN.X * VARS.SCALE}px; min-width: ${(VARS.SCREEN.X * VARS.SCALE) + EMPTY_OFFSET}px;
min-height: ${VARS.SCREEN.Y * VARS.SCALE}px; min-height: ${VARS.SCREEN.Y * VARS.SCALE}px;
`; `;
@ -72,7 +73,8 @@ const Workspace = (id: number, name: string, normal = true) => {
DEFAULT_STYLE : DEFAULT_STYLE :
` `
min-width: ${VARS.SCREEN.X * VARS.SCALE / 2}px; min-width: ${(VARS.SCREEN.X * VARS.SCALE / 2) +
EMPTY_OFFSET}px;
min-height: ${VARS.SCREEN.Y * VARS.SCALE}px; min-height: ${VARS.SCREEN.Y * VARS.SCALE}px;
`, `,