0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-14 08:41:48 -05:00

🐛 Fix UI of clip content + show in viewer icons

This commit is contained in:
Belén Albeza 2024-02-20 13:35:06 +01:00
parent 4097dec5a4
commit c484c0d667
2 changed files with 20 additions and 19 deletions
frontend/src/app/main/ui/workspace/sidebar/options/menus

View file

@ -52,6 +52,9 @@
:svg-raw #{:size :position :rotation} :svg-raw #{:size :position :rotation}
:text #{:size :position :rotation}}) :text #{:size :position :rotation}})
(def ^:private clip-content-icon (i/icon-xref :clip-content-refactor (stl/css :checkbox-button)))
(def ^:private play-icon (i/icon-xref :play-refactor (stl/css :checkbox-button)))
(defn select-measure-keys (defn select-measure-keys
"Consider some shapes can be drawn from bottom to top or from left to right" "Consider some shapes can be drawn from bottom to top or from left to right"
[shape] [shape]
@ -543,8 +546,7 @@
:title (tr "workspace.options.clip-content") :title (tr "workspace.options.clip-content")
:class (stl/css-case :clip-content-label true :class (stl/css-case :clip-content-label true
:selected (not (:show-content values)))} :selected (not (:show-content values)))}
[:span {:class (stl/css :icon)} clip-content-icon]])
i/clip-content-refactor]]])
(when (options :show-in-viewer) (when (options :show-in-viewer)
[:div {:class (stl/css :show-in-viewer)} [:div {:class (stl/css :show-in-viewer)}
[:input {:type "checkbox" [:input {:type "checkbox"
@ -559,4 +561,4 @@
:class (stl/css-case :clip-content-label true :class (stl/css-case :clip-content-label true
:selected (not (:hide-in-viewer values)))} :selected (not (:hide-in-viewer values)))}
[:span {:class (stl/css :icon)} [:span {:class (stl/css :icon)}
i/play-refactor]]])])])) play-icon]]])])]))

View file

@ -219,20 +219,19 @@
.clip-content-input { .clip-content-input {
display: none; display: none;
} }
.clip-content-label { }
@extend .button-tertiary;
height: $s-32; .clip-content-label {
width: $s-28; @extend .button-tertiary;
border-radius: $br-8; height: $s-32;
.icon { width: $s-28;
@include flexCenter; border-radius: $br-8;
svg { }
@extend .button-icon;
stroke: var(--icon-foreground); .selected {
} @extend .button-icon-selected;
} }
&.selected {
@extend .button-icon-selected; .checkbox-button {
} @extend .button-icon;
}
} }