mirror of
https://github.com/penpot/penpot.git
synced 2026-09-14 07:59:36 +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
|
:class (dm/str size-classname " " (stl/css-case :palettes true
|
||||||
:wide any-palette?
|
:wide any-palette?
|
||||||
:hidden-bts hide-palettes?))
|
: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)
|
[:div {:class (stl/css :resize-area)
|
||||||
:on-pointer-down on-pointer-down
|
:on-pointer-down on-pointer-down
|
||||||
|
|||||||
@ -97,7 +97,7 @@
|
|||||||
(if sitemap-collapsed? 32 height)]
|
(if sitemap-collapsed? 32 height)]
|
||||||
|
|
||||||
[:article {:class (stl/css :layers-tab)
|
[: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
|
[:> sitemap* {:layout layout
|
||||||
:height sitemap-height
|
:height sitemap-height
|
||||||
@ -182,7 +182,7 @@
|
|||||||
:data-width (str width)
|
:data-width (str width)
|
||||||
:class aside-class
|
:class aside-class
|
||||||
:on-context-menu dom/prevent-default-context-menu
|
: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
|
[:> left-header* {:file file
|
||||||
:layout layout
|
:layout layout
|
||||||
@ -327,10 +327,13 @@
|
|||||||
:data-testid "right-sidebar"
|
:data-testid "right-sidebar"
|
||||||
:data-size (str width)
|
:data-size (str width)
|
||||||
:on-context-menu dom/prevent-default-context-menu
|
:on-context-menu dom/prevent-default-context-menu
|
||||||
:style {:--right-sidebar-width (cond
|
:style {:--right-sidebar-width
|
||||||
is-debug? (dm/str right-sidebar-default-max-width "px")
|
(dm/str "calc("
|
||||||
can-be-expanded? (dm/str width "px")
|
(cond
|
||||||
:else (dm/str right-sidebar-default-width "px"))}}
|
is-debug? right-sidebar-default-max-width
|
||||||
|
can-be-expanded? width
|
||||||
|
:else right-sidebar-default-width)
|
||||||
|
"px * var(--ui-scale))")}}
|
||||||
|
|
||||||
(when can-be-expanded?
|
(when can-be-expanded?
|
||||||
[:div {:class (stl/css :resize-area)
|
[:div {:class (stl/css :resize-area)
|
||||||
|
|||||||
@ -69,7 +69,7 @@
|
|||||||
[:> token-set-context-menu*]
|
[:> token-set-context-menu*]
|
||||||
[:section {:data-testid "token-management-sidebar"
|
[:section {:data-testid "token-management-sidebar"
|
||||||
:class (stl/css :token-management-section-wrapper)
|
: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*]
|
[:> themes-header*]
|
||||||
[:div {:class (stl/css :sidebar-header)}
|
[:div {:class (stl/css :sidebar-header)}
|
||||||
[:> title-bar* {:title (tr "labels.sets")}
|
[:> title-bar* {:title (tr "labels.sets")}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user