From 86e37578c731c396438a2390691792f25c5efc14 Mon Sep 17 00:00:00 2001 From: matt1432 Date: Mon, 15 Jan 2024 16:04:09 -0500 Subject: [PATCH] fix(ags overview): make empty workspaces a fixed width --- devices/wim/config/ags/ts/overview/current-workspace.ts | 2 +- devices/wim/config/ags/ts/overview/workspaces.ts | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/devices/wim/config/ags/ts/overview/current-workspace.ts b/devices/wim/config/ags/ts/overview/current-workspace.ts index 2d9758d..ec7a08f 100644 --- a/devices/wim/config/ags/ts/overview/current-workspace.ts +++ b/devices/wim/config/ags/ts/overview/current-workspace.ts @@ -39,7 +39,7 @@ export const updateCurrentWorkspace = (main: AgsBox, highlighter: AgsBox) => { const currentIndex = workspaces.findIndex( (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)); highlighter.setCss(` diff --git a/devices/wim/config/ags/ts/overview/workspaces.ts b/devices/wim/config/ags/ts/overview/workspaces.ts index fc5790b..9525bb9 100644 --- a/devices/wim/config/ags/ts/overview/workspaces.ts +++ b/devices/wim/config/ags/ts/overview/workspaces.ts @@ -5,8 +5,9 @@ import { Revealer, CenterBox, Box, EventBox, Fixed, Label } from 'resource:///co import { WorkspaceDrop } from './dragndrop.ts'; import * as VARS from './variables.ts'; +const EMPTY_OFFSET = 16; 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; `; @@ -72,7 +73,8 @@ const Workspace = (id: number, name: string, normal = true) => { 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; `,