mirror of
https://github.com/penpot/penpot.git
synced 2026-08-07 13:29:07 +00:00
🎉 Adjust palette and sidebar to ui scale setting
This commit is contained in:
parent
e2a7b7675b
commit
9a4aa73c51
@ -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
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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")}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user