Skip to content

Commit

Permalink
Increase ColorPicker spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
fjvallarino committed Oct 25, 2021
1 parent c62d2ea commit 5c42bb7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/Monomer/Widgets/Singles/ColorPicker.hs
Original file line number Diff line number Diff line change
Expand Up @@ -193,12 +193,12 @@ buildUI config wenv model = mainTree where
] `styleBasic` [width 32]

compRow lensCol evt lbl minV maxV = hstack [
label lbl `styleBasic` [width 48],
spacer_ [width 2],
label lbl,
spacer_ [width 5],
hslider_ lensCol minV maxV [onChange evt, onFocus PickerFocus,
onBlur PickerBlur]
`styleBasic` [paddingV 5],
spacer_ [width 2],
spacer_ [width 5],
numericField_ lensCol [minValue minV, maxValue maxV, onChange evt,
onFocus PickerFocus, onBlur PickerBlur]
`styleBasic` [width 40, padding 0, textRight]
Expand All @@ -217,7 +217,7 @@ buildUI config wenv model = mainTree where
spacer_ [width 2] `nodeVisible` showAlpha,
alphaRow L.a "A" `nodeVisible` showAlpha
],
spacer_ [width 2],
spacer_ [width 5],
box_ [alignTop] colorSample `styleBasic` [flexHeight 50]
] `styleBasic` [padding 0]

Expand Down
8 changes: 4 additions & 4 deletions test/unit/Monomer/Widgets/Singles/ColorPickerSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ spec = describe "ColorPicker" $ do
handleEvent :: Spec
handleEvent = describe "handleEvent" $ do
it "should update the model" $
model (Point 306 10) ^. color `shouldBe` rgb 127 0 0
model (Point 285 10) ^. color `shouldBe` rgb 127 0 0

it "should generate an event when focus is received" $
events evtFocus `shouldBe` Seq.singleton (GotFocus emptyPath)
Expand All @@ -70,7 +70,7 @@ handleEvent = describe "handleEvent" $ do
handleEventV :: Spec
handleEventV = describe "handleEventV" $ do
it "should generante a change event" $
events (evtRelease (Point 453 30)) `shouldBe` Seq.singleton (ColorChanged (rgb 0 200 0))
events (evtRelease (Point 440 30)) `shouldBe` Seq.singleton (ColorChanged (rgb 0 200 0))

it "should generate an event when focus is received" $
events evtFocus `shouldBe` Seq.singleton (GotFocus emptyPath)
Expand All @@ -85,8 +85,8 @@ handleEventV = describe "handleEventV" $ do

getSizeReq :: Spec
getSizeReq = describe "getSizeReq" $ do
it "should return width = Range 126 1126" $
sizeReqW `shouldBe` rangeSize 126 1126 1
it "should return width = Range 97 1097" $
sizeReqW `shouldBe` rangeSize 97 1097 1

it "should return height = Fixed 64" $
sizeReqH `shouldBe` fixedSize 64
Expand Down

0 comments on commit 5c42bb7

Please sign in to comment.