diff --git a/theme.go b/theme.go index eec33f9..da5761e 100644 --- a/theme.go +++ b/theme.go @@ -82,9 +82,8 @@ func (Theme) Apply (object tomo.Object, role theme.Role) event.Cookie { gapBorder, buttonBorder, } - + padding := tomo.I(4, 8) box.SetColor(buttonColor) - box.SetPadding(tomo.I(4, 8)) if box.Focused() { box.SetColor(buttonColorFocused) @@ -92,12 +91,13 @@ func (Theme) Apply (object tomo.Object, role theme.Role) event.Cookie { } if pressed { box.SetColor(buttonColorPressed) + padding = tomo.I(5, 8, 4, 9) border[2] = sunkenShadow - box.SetPadding(tomo.I(5, 8, 4, 9)) } else if hovered { box.SetColor(buttonColorHovered) } box.SetBorder(border...) + box.SetPadding(padding) } updateStyle() return event.MultiCookie ( @@ -155,11 +155,16 @@ func (Theme) Apply (object tomo.Object, role theme.Role) event.Cookie { case "Separator": box.SetBorder(engravedBorder) - box.SetMinimumSize(image.Pt(2, 2)) case "Slider": pressed := false hovered := false + + if role.Variant == "vertical" { + box.SetMinimumSize(image.Pt(0, 48)) + } else { + box.SetMinimumSize(image.Pt(48, 0)) + } updateStyle := func () { border := []tomo.Border {