add color picker tooltip

This commit is contained in:
elhombretecla 2016-04-23 12:19:46 +02:00 committed by Andrey Antukh
parent a779369185
commit 5a50bc80e3
No known key found for this signature in database
GPG Key ID: 4DFEBCB8316A8B95
2 changed files with 32 additions and 15 deletions

View File

@ -104,7 +104,6 @@
.color-data { .color-data {
align-items: center; align-items: center;
display: flex; display: flex;
margin-bottom: $x-small;
position: relative; position: relative;
.color-info { .color-info {
@ -123,3 +122,15 @@
color: $intense-ui-text; color: $intense-ui-text;
} }
} }
.colorpicker-tooltip {
background: $color-white;
border-radius: $br-small;
display: flex;
flex-direction: column;
left: 0;
padding: $small;
position: absolute;
top: -20px;
z-index: 11;
}

View File

@ -119,6 +119,16 @@
;; SLIDEBAR FOR ROTATION AND OPACITY ;; SLIDEBAR FOR ROTATION AND OPACITY
[:span "Color"] [:span "Color"]
;; NEW COLOR PICKER
[:div.row-flex.color-data
[:span.color-th]
[:div.color-info
[:span.type "#"]
[:span.number "F1F1F1"]]
;; COLOR PICKER TOOLTIP
[:div.colorpicker-tooltip
[:div.color-picker-small [:div.color-picker-small
(colorpicker (colorpicker
:theme :small :theme :small
@ -130,16 +140,12 @@
{:placeholder "#" {:placeholder "#"
:type "text" :type "text"
:value (:stroke shape "") :value (:stroke shape "")
:on-change on-color-change}]] :on-change on-color-change}]
[:input.input-text
{:placeholder "RGB"
:type "text"}]]
;; NEW COLOR PICKER (recent-colors shape #(change-stroke {:color %}))]]
[:div.row-flex.color-data
[:span.color-th]
[:div.color-info
[:span.type "#"]
[:span.number "F1F1F1"]]]
(recent-colors shape #(change-stroke {:color %}))
;; SLIDEBAR FOR ROTATION AND OPACITY ;; SLIDEBAR FOR ROTATION AND OPACITY
[:span "Opacity"] [:span "Opacity"]