From 705d70d4f7fc916be13c8e8244bfb053d670dc05 Mon Sep 17 00:00:00 2001 From: Senk Ju <18741573+SenkJu@users.noreply.github.com> Date: Sun, 1 Sep 2024 19:50:23 +0200 Subject: [PATCH] fix module description position --- src-theme/src/routes/clickgui/ClickGui.svelte | 12 +++++++----- src-theme/src/routes/clickgui/Module.svelte | 6 ++++-- src-theme/src/routes/clickgui/Panel.svelte | 12 ++++++------ src-theme/src/routes/clickgui/clickgui_store.ts | 4 +++- 4 files changed, 20 insertions(+), 14 deletions(-) diff --git a/src-theme/src/routes/clickgui/ClickGui.svelte b/src-theme/src/routes/clickgui/ClickGui.svelte index ab436cb7eb8..cdc967e93a8 100644 --- a/src-theme/src/routes/clickgui/ClickGui.svelte +++ b/src-theme/src/routes/clickgui/ClickGui.svelte @@ -1,6 +1,6 @@
+ style="transform: scale({$scaleFactor * 50}%); width: {2 / $scaleFactor * 100}vw; height: {2 / $scaleFactor * 100}vh;"> {#each Object.entries(categories) as [category, modules], panelIndex} - + {/each}
diff --git a/src-theme/src/routes/clickgui/Module.svelte b/src-theme/src/routes/clickgui/Module.svelte index 1490e5d24fb..d67c60ca61e 100644 --- a/src-theme/src/routes/clickgui/Module.svelte +++ b/src-theme/src/routes/clickgui/Module.svelte @@ -12,6 +12,7 @@ import {description as descriptionStore, highlightModuleName} from "./clickgui_store"; import {setItem} from "../../integration/persistent_storage"; import {convertToSpacedString, spaceSeperatedNames} from "../../theme/theme_config"; + import {scaleFactor} from "./clickgui_store"; export let name: string; export let enabled: boolean; @@ -63,9 +64,10 @@ if (aliases.length > 0) { moduleDescription += ` (aka ${aliases.map(a => $spaceSeperatedNames ? convertToSpacedString(a) : a).join(", ")})`; } + console.log($scaleFactor) descriptionStore.set({ - x, - y, + x: x * (2 / $scaleFactor), + y: y * (2 / $scaleFactor), description: moduleDescription }); } diff --git a/src-theme/src/routes/clickgui/Panel.svelte b/src-theme/src/routes/clickgui/Panel.svelte index 2607f50665e..7f6213d10a6 100644 --- a/src-theme/src/routes/clickgui/Panel.svelte +++ b/src-theme/src/routes/clickgui/Panel.svelte @@ -1,5 +1,5 @@