From 9a4aa73c51872b5e605e827cda8b2bbffb9d71e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bel=C3=A9n=20Albeza?= Date: Wed, 15 Jul 2026 10:58:18 +0200 Subject: [PATCH] :tada: Adjust palette and sidebar to ui scale setting --- frontend/src/app/main/ui/workspace/palette.cljs | 2 +- frontend/src/app/main/ui/workspace/sidebar.cljs | 15 +++++++++------ .../src/app/main/ui/workspace/tokens/sidebar.cljs | 2 +- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/frontend/src/app/main/ui/workspace/palette.cljs b/frontend/src/app/main/ui/workspace/palette.cljs index 11ba417e9b..eaeb16ce66 100644 --- a/frontend/src/app/main/ui/workspace/palette.cljs +++ b/frontend/src/app/main/ui/workspace/palette.cljs @@ -170,7 +170,7 @@ :class (dm/str size-classname " " (stl/css-case :palettes true :wide any-palette? :hidden-bts hide-palettes?)) - :style #js {"--height" (dm/str size "px")}} + :style #js {"--height" (dm/str "calc(" size "px * var(--ui-scale))")}} [:div {:class (stl/css :resize-area) :on-pointer-down on-pointer-down diff --git a/frontend/src/app/main/ui/workspace/sidebar.cljs b/frontend/src/app/main/ui/workspace/sidebar.cljs index c918288270..888c3f7ec2 100644 --- a/frontend/src/app/main/ui/workspace/sidebar.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar.cljs @@ -97,7 +97,7 @@ (if sitemap-collapsed? 32 height)] [:article {:class (stl/css :layers-tab) - :style {:--height (dm/str height "px")}} + :style {:--height (dm/str "calc(" height "px * var(--ui-scale))")}} [:> sitemap* {:layout layout :height sitemap-height @@ -182,7 +182,7 @@ :data-width (str width) :class aside-class :on-context-menu dom/prevent-default-context-menu - :style {:--left-sidebar-width (dm/str width "px")}} + :style {:--left-sidebar-width (dm/str "calc(" width "px * var(--ui-scale))")}} [:> left-header* {:file file :layout layout @@ -327,10 +327,13 @@ :data-testid "right-sidebar" :data-size (str width) :on-context-menu dom/prevent-default-context-menu - :style {:--right-sidebar-width (cond - is-debug? (dm/str right-sidebar-default-max-width "px") - can-be-expanded? (dm/str width "px") - :else (dm/str right-sidebar-default-width "px"))}} + :style {:--right-sidebar-width + (dm/str "calc(" + (cond + is-debug? right-sidebar-default-max-width + can-be-expanded? width + :else right-sidebar-default-width) + "px * var(--ui-scale))")}} (when can-be-expanded? [:div {:class (stl/css :resize-area) diff --git a/frontend/src/app/main/ui/workspace/tokens/sidebar.cljs b/frontend/src/app/main/ui/workspace/tokens/sidebar.cljs index dfbc3815d1..569278bb40 100644 --- a/frontend/src/app/main/ui/workspace/tokens/sidebar.cljs +++ b/frontend/src/app/main/ui/workspace/tokens/sidebar.cljs @@ -69,7 +69,7 @@ [:> token-set-context-menu*] [:section {:data-testid "token-management-sidebar" :class (stl/css :token-management-section-wrapper) - :style {"--resize-height" (str resize-height "px")}} + :style {"--resize-height" (str "calc(" resize-height "px * var(--ui-scale))")}} [:> themes-header*] [:div {:class (stl/css :sidebar-header)} [:> title-bar* {:title (tr "labels.sets")}