🎉 Adjust palette and sidebar to ui scale setting

This commit is contained in:
Belén Albeza 2026-07-15 10:58:18 +02:00
parent e2a7b7675b
commit 9a4aa73c51
3 changed files with 11 additions and 8 deletions

View File

@ -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

View File

@ -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)

View File

@ -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")}