From a03eab9898c04d301d06fabe42732325d9a2716e Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Fri, 16 Aug 2024 17:26:20 -0400 Subject: [PATCH] Add fallback styling for dropdowns --- internal/styles/fallback/wintergreen.go | 37 +++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/internal/styles/fallback/wintergreen.go b/internal/styles/fallback/wintergreen.go index ced3ab1..2b0c982 100644 --- a/internal/styles/fallback/wintergreen.go +++ b/internal/styles/fallback/wintergreen.go @@ -538,6 +538,43 @@ rules := []style.Rule { tomo.AttrColor { Color: tomo.ColorSunken }, tomo.AttrMinimumSize { X: 128, Y: 128 }, ), tomo.R("", "ColorPickerMap")), + + // *.Dropdown + style.Ru(style.AS ( + tomo.AttrBorder { + outline, + tomo.Border { + Width: tomo.I(1), + Color: borderColorLifted, + }, + }, + tomo.AttrPadding(tomo.I(4, 8)), + tomo.AttrColor { Color: tomo.ColorRaised }, + ), tomo.R("", "Dropdown")), + + // *.Dropdown[focused] + style.Ru(style.AS ( + tomo.AttrBorder { + outline, + tomo.Border { + Width: tomo.I(1), + Color: borderColorFocused, + }, + }, + ), tomo.R("", "Dropdown"), "focused"), + + // *.Dropdown[pressed] + style.Ru(style.AS ( + tomo.AttrBorder { + outline, + tomo.Border { + Width: tomo.I(1, 0, 0, 1), + Color: borderColorEngraved, + }, + }, + tomo.AttrPadding(tomo.I(5, 8, 4, 9)), + tomo.AttrColor { Color: colorCarvedPressed }, + ), tomo.R("", "Dropdown"), "pressed"), } return &style.Style {