Migrate Wintergreen theme

This commit is contained in:
Sasha Koshka 2024-07-25 17:47:50 -04:00
parent b069980325
commit 67b8f9f752
2 changed files with 393 additions and 459 deletions

View File

@ -3,7 +3,6 @@ package fallbackStyle
import "image/color"
import "git.tebibyte.media/tomo/tomo"
import "golang.org/x/image/font/basicfont"
import "git.tebibyte.media/tomo/nasin/internal/style"
var colorFocus = color.RGBA { R: 61, G: 128, B: 143, A: 255 }
var colorInput = color.RGBA { R: 208, G: 203, B: 150, A: 255 }
@ -39,520 +38,456 @@ var borderColorInput = [4]color.Color { colorInputShadow, colorInput, col
var borderColorFocused = [4]color.Color { colorFocus, colorFocus, colorFocus, colorFocus }
var borderColorShade = [4]color.Color { colorShade, colorShade, colorShade, colorShade }
var rules = []style.Rule {
// *.*[*]
style.Rule {
Default: style.AS (
style.AttrFace { Face: basicfont.Face7x13 },
style.AttrTextColor { Color: tomo.ColorForeground },
style.AttrDotColor { Color: tomo.ColorAccent },
style.AttrGap { X: 8, Y: 8 },
),
},
var rules = []tomo.Rule {
// *.*
tomo.Ru(tomo.AS (
tomo.AFace (basicfont.Face7x13 ),
tomo.ATextColor (tomo.ColorForeground),
tomo.ADotColor (tomo.ColorAccent ),
tomo.AGap (8, 8 ),
), tomo.R("", "")),
// *.Button[*]
style.Rule {
Role: tomo.R("", "Button", ""),
Default: style.AS (
style.AttrBorder {
outline,
tomo.Border {
Width: tomo.I(1),
Color: borderColorLifted,
},
// *.Button
tomo.Ru(tomo.AS (
tomo.AttrBorder {
outline,
tomo.Border {
Width: tomo.I(1),
Color: borderColorLifted,
},
style.AttrPadding(tomo.I(4, 8)),
style.AttrColor { Color: tomo.ColorRaised },
),
Pressed: style.AS (
style.AttrBorder {
outline,
tomo.Border {
Width: tomo.I(1, 0, 0, 1),
Color: borderColorEngraved,
},
},
style.AttrPadding(tomo.I(5, 8, 4, 9)),
style.AttrColor { Color: colorCarvedPressed },
),
Focused: style.AS (
style.AttrBorder {
outline,
tomo.Border {
Width: tomo.I(1),
Color: borderColorFocused,
},
},
style.AttrPadding(tomo.I(4, 8)),
),
},
},
tomo.AttrPadding(tomo.I(4, 8)),
tomo.AttrColor { Color: tomo.ColorRaised },
), tomo.R("", "Button")),
// *.TextInput[*]
style.Rule {
Role: tomo.R("", "TextInput", ""),
Default: style.AS (
style.AttrBorder {
outline,
tomo.Border {
Width: tomo.I(1),
Color: borderColorInput,
},
// *.Button[focused]
tomo.Ru(tomo.AS (
tomo.AttrBorder {
outline,
tomo.Border {
Width: tomo.I(1),
Color: borderColorFocused,
},
style.AttrColor { Color: colorInput },
style.AttrPadding(tomo.I(5, 4, 4, 5)),
),
Focused: style.AS (
style.AttrBorder {
outline,
tomo.Border {
Width: tomo.I(1),
Color: borderColorFocused,
},
},
),
},
// *.TextView[*]
style.Rule {
Role: tomo.R("", "TextView", ""),
Default: style.AS (
style.AttrBorder {
outline,
tomo.Border {
Width: tomo.I(1, 0, 0, 1),
Color: borderColorEngraved,
},
},
style.AttrColor { Color: tomo.ColorSunken },
style.AttrPadding(tomo.I(8)),
),
},
},
tomo.AttrPadding(tomo.I(4, 8)),
), tomo.R("", "Button"), "focused"),
// *.NumberInput[*]
style.Rule {
Role: tomo.R("", "NumberInput", ""),
Default: style.AS (
style.AttrGap { },
),
},
// *.Button[pressed]
tomo.Ru(tomo.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("", "Button"), "pressed"),
// *.TextInput
tomo.Ru(tomo.AS (
tomo.ABorder (
outline,
tomo.Border {
Width: tomo.I(1),
Color: borderColorInput,
}),
tomo.AColor(colorInput),
tomo.APadding(5, 4, 4, 5),
), tomo.R("", "TextInput")),
// *.TextInput[focused]
tomo.Ru(tomo.AS (
tomo.ABorder (
outline,
tomo.Border {
Width: tomo.I(1),
Color: borderColorFocused,
}),
), tomo.R("", "TextInput"), "focused"),
// *.TextView
tomo.Ru(tomo.AS (
tomo.ABorder (
outline,
tomo.Border {
Width: tomo.I(1, 0, 0, 1),
Color: borderColorEngraved,
}),
tomo.AColor(tomo.ColorSunken),
tomo.APadding(8),
), tomo.R("", "TextView")),
// *.NumberInput
tomo.Ru(tomo.AS (
tomo.AGap(0, 0),
), tomo.R("", "NumberInput")),
// *.Container[sunken]
style.Rule {
Role: tomo.R("", "Container", "sunken"),
Default: style.AS (
style.AttrBorder {
outline,
tomo.Border {
Width: tomo.I(1, 0, 0, 1),
Color: borderColorEngraved,
},
tomo.Ru(tomo.AS (
tomo.AttrBorder {
outline,
tomo.Border {
Width: tomo.I(1, 0, 0, 1),
Color: borderColorEngraved,
},
style.AttrColor { Color: tomo.ColorSunken },
style.AttrPadding(tomo.I(8)),
),
},
},
tomo.AttrColor { Color: tomo.ColorSunken },
tomo.AttrPadding(tomo.I(8)),
), tomo.R("", "Container"), "sunken"),
// *.Container[outer]
style.Rule {
Role: tomo.R("", "Container", "outer"),
Default: style.AS (
style.AttrColor { Color: tomo.ColorBackground },
style.AttrPadding(tomo.I(8)),
),
},
tomo.Ru(tomo.AS (
tomo.AttrColor { Color: tomo.ColorBackground },
tomo.AttrPadding(tomo.I(8)),
), tomo.R("", "Container"), "outer"),
// *.Container[menu]
style.Rule {
Role: tomo.R("", "Container", "menu"),
Default: style.AS (
style.AttrBorder {
outline,
tomo.Border {
Width: tomo.I(1),
Color: borderColorLifted,
},
tomo.Ru(tomo.AS (
tomo.AttrBorder {
outline,
tomo.Border {
Width: tomo.I(1),
Color: borderColorLifted,
},
style.AttrColor { Color: tomo.ColorBackground },
style.AttrGap { },
),
},
},
tomo.AttrColor { Color: tomo.ColorBackground },
tomo.AttrGap { },
), tomo.R("", "Container"), "menu"),
// *.Heading[*]
style.Rule {
Role: tomo.R("", "Heading", ""),
Default: style.AS (
style.AttrAlign { X: tomo.AlignMiddle, Y: tomo.AlignMiddle },
),
},
// *.Heading
tomo.Ru(tomo.AS (
tomo.AAlign(tomo.AlignMiddle, tomo.AlignMiddle),
), tomo.R("", "Heading")),
// *.Separator[*]
style.Rule {
Role: tomo.R("", "Separator", ""),
Default: style.AS (
style.AttrBorder {
tomo.Border {
Width: tomo.I(1),
Color: borderColorEngraved,
},
// *.Separator
tomo.Ru(tomo.AS (
tomo.AttrBorder {
tomo.Border {
Width: tomo.I(1),
Color: borderColorEngraved,
},
),
},
},
), tomo.R("", "Separator")),
// *.Slider[*]
style.Rule {
Role: tomo.R("", "Slider", ""),
Default: style.AS (
style.AttrBorder {
outline,
tomo.Border {
Width: tomo.I(1, 0, 0, 1),
Color: borderColorEngraved,
},
// *.Slider
tomo.Ru(tomo.AS (
tomo.AttrBorder {
outline,
tomo.Border {
Width: tomo.I(1, 0, 0, 1),
Color: borderColorEngraved,
},
style.AttrColor { Color: colorGutter },
style.AttrPadding(tomo.I(0, 1, 1, 0)),
),
Focused: style.AS (
style.AttrBorder {
},
tomo.AttrColor { Color: colorGutter },
tomo.AttrPadding(tomo.I(0, 1, 1, 0)),
), tomo.R("", "Slider")),
// *.Slider[focused]
tomo.Ru(tomo.AS (
tomo.AttrBorder {
outline,
tomo.Border {
Width: tomo.I(1),
Color: borderColorFocused,
},
},
style.AttrPadding(tomo.I(0)),
),
},
tomo.AttrPadding(tomo.I(0)),
), tomo.R("", "Slider"), "focused"),
// *.Slider[horizontal]
style.Rule {
Role: tomo.R("", "Slider", "horizontal"),
Default: style.AS(style.AttrMinimumSize { X: 48 }),
},
tomo.Ru(tomo.AS (
tomo.AMinimumSize(48, 0),
), tomo.R("", "Slider"), "horizontal"),
// *.Slider[vertical]
style.Rule {
Role: tomo.R("", "Slider", "vertical"),
Default: style.AS(style.AttrMinimumSize { Y: 48 }),
},
tomo.Ru(tomo.AS (
tomo.AMinimumSize(0, 48),
), tomo.R("", "Slider"), "vertical"),
// *.SliderHandle[*]
style.Rule {
Role: tomo.R("", "SliderHandle", ""),
Default: style.AS (
style.AttrBorder {
outline,
tomo.Border {
Width: tomo.I(1),
Color: borderColorLifted,
},
// *.SliderHandle
tomo.Ru(tomo.AS (
tomo.AttrBorder {
outline,
tomo.Border {
Width: tomo.I(1),
Color: borderColorLifted,
},
style.AttrColor { Color: tomo.ColorRaised },
style.AttrMinimumSize { X: 12, Y: 12, },
),
},
},
tomo.AttrColor { Color: tomo.ColorRaised },
tomo.AttrMinimumSize { X: 12, Y: 12, },
), tomo.R("", "SliderHandle")),
// *.Checkbox[*]
style.Rule {
Role: tomo.R("", "Checkbox", ""),
Default: style.AS (
style.AttrBorder {
outline,
tomo.Border {
Width: tomo.I(1, 0, 0, 1),
Color: borderColorEngraved,
},
},
style.AttrColor { Color: tomo.ColorSunken },
style.AttrPadding(tomo.I(0, 1, 1, 0)),
style.AttrMinimumSize { X: 19, Y: 19 },
),
Focused: style.AS (
style.AttrBorder {
outline,
tomo.Border {
Width: tomo.I(1),
Color: borderColorFocused,
},
},
style.AttrPadding(tomo.I(0)),
),
},
// *.Checkbox
tomo.Ru(tomo.AS (
tomo.ABorder (
outline,
tomo.Border {
Width: tomo.I(1, 0, 0, 1),
Color: borderColorEngraved,
}),
tomo.AColor(tomo.ColorSunken),
tomo.APadding(0, 1, 1, 0),
tomo.AMinimumSize(19, 19),
tomo.ATexture(nil),
tomo.ATextureMode(tomo.TextureModeCenter),
), tomo.R("", "Checkbox")),
// *.MenuItem[*]
style.Rule {
Role: tomo.R("", "MenuItem", ""),
Default: style.AS (
style.AttrPadding(tomo.I(4)),
style.AttrGap { X: 4, Y: 4 },
style.AttrColor { Color: color.Transparent },
),
Hovered: style.AS (
style.AttrColor { Color: tomo.ColorAccent },
),
Focused: style.AS (
style.AttrColor { Color: tomo.ColorAccent },
),
},
// *.Checkbox[focused]
tomo.Ru(tomo.AS (
tomo.ABorder (
outline,
tomo.Border {
Width: tomo.I(1),
Color: borderColorFocused,
}),
tomo.APadding(0),
), tomo.R("", "Checkbox"), "focused"),
// *.File[*]
style.Rule {
Role: tomo.R("", "File", ""),
Default: style.AS (
style.AttrColor { Color: color.Transparent },
),
Focused: style.AS (
style.AttrColor { Color: tomo.ColorAccent },
),
},
// *.Checkbox[checked]
tomo.Ru(tomo.AS (
tomo.ATexture(nil), // TODO: checked texture
), tomo.R("", "Checkbox"), "checked"),
// *.TearLine[*]
style.Rule {
Role: tomo.R("", "TearLine", ""),
Default: style.AS (
style.AttrBorder {
tomo.Border {
Width: tomo.I(3),
Color: [4]color.Color {
color.Transparent,
color.Transparent,
color.Transparent,
color.Transparent,
},
},
},
style.AttrColor { Color: tomo.ColorForeground },
style.AttrPadding(tomo.I(1, 0, 0, 1)),
),
Hovered: style.AS (
style.AttrBorder {
tomo.Border {
Width: tomo.I(3),
Color: borderColorFocused,
},
},
),
Focused: style.AS (
style.AttrBorder {
tomo.Border {
Width: tomo.I(3),
Color: borderColorFocused,
},
},
),
},
// *.MenuItem
tomo.Ru(tomo.AS (
tomo.AttrPadding(tomo.I(4)),
tomo.AttrGap { X: 4, Y: 4 },
tomo.AttrColor { Color: color.Transparent },
), tomo.R("", "MenuItem")),
// *MenuItem[focused]
tomo.Ru(tomo.AS (
tomo.AttrColor { Color: tomo.ColorAccent },
), tomo.R("", "MenuItem"), "focused"),
// *.Calendar[*]
style.Rule {
Role: tomo.R("", "Calendar", ""),
Default: style.AS (
style.AttrBorder {
tomo.Border {
Width: tomo.I(0, 1, 1, 0),
Color: borderColorShade,
// *.MenuItem[hovered]
tomo.Ru(tomo.AS (
tomo.AttrColor { Color: tomo.ColorAccent },
), tomo.R("", "MenuItem"), "hovered"),
// *.File
tomo.Ru(tomo.AS (
tomo.AttrColor { Color: color.Transparent },
), tomo.R("", "File")),
// *.File[focused]
tomo.Ru(tomo.AS (
tomo.AttrColor { Color: tomo.ColorAccent },
), tomo.R("", "File"), "focused"),
// *.TearLine
tomo.Ru(tomo.AS (
tomo.AttrBorder {
tomo.Border {
Width: tomo.I(3),
Color: [4]color.Color {
color.Transparent,
color.Transparent,
color.Transparent,
color.Transparent,
},
outline,
},
style.AttrColor { Color: colorInput },
style.AttrPadding(tomo.I(2)),
style.AttrGap { X: 2, Y: 2 },
),
},
},
tomo.AttrColor { Color: tomo.ColorForeground },
tomo.AttrPadding(tomo.I(1, 0, 0, 1)),
), tomo.R("", "TearLine")),
// *.TearLine[focused]
tomo.Ru(tomo.AS (
tomo.AttrBorder {
tomo.Border {
Width: tomo.I(3),
Color: borderColorFocused,
},
},
), tomo.R("", "TearLine"), "focused"),
// *.TearLine[hovered]
tomo.Ru(tomo.AS (
tomo.AttrBorder {
tomo.Border {
Width: tomo.I(3),
Color: borderColorFocused,
},
},
), tomo.R("", "TearLine"), "hovered"),
// *.CalendarGrid[*]
style.Rule {
Role: tomo.R("", "CalendarGrid", ""),
Default: style.AS (
style.AttrGap { X: 2, Y: 2 },
),
},
// *.Calendar
tomo.Ru(tomo.AS (
tomo.AttrBorder {
tomo.Border {
Width: tomo.I(0, 1, 1, 0),
Color: borderColorShade,
},
outline,
},
tomo.AttrColor { Color: colorInput },
tomo.AttrPadding(tomo.I(2)),
tomo.AttrGap { X: 2, Y: 2 },
), tomo.R("", "Calendar")),
// *.CalendarWeekdayHeader[*]
style.Rule {
Role: tomo.R("", "CalendarWeekdayHeader", ""),
Default: style.AS (
style.AttrPadding(tomo.I(2)),
style.AttrColor { Color: colorCalendarWeekdayHeader },
),
},
// *.CalendarGrid
tomo.Ru(tomo.AS (
tomo.AttrGap { X: 2, Y: 2 },
), tomo.R("", "CalendarGrid")),
// *.CalendarWeekdayHeader
tomo.Ru(tomo.AS (
tomo.AttrPadding(tomo.I(2)),
tomo.AttrColor { Color: colorCalendarWeekdayHeader },
), tomo.R("", "CalendarWeekdayHeader")),
// *.CalendarDay[weekday]
style.Rule {
Role: tomo.R("", "CalendarDay", "weekday"),
Default: style.AS (
style.AttrPadding(tomo.I(2)),
style.AttrMinimumSize { X: 32, Y: 32 },
style.AttrColor { Color: colorCalendarDay },
),
},
tomo.Ru(tomo.AS (
tomo.AttrPadding(tomo.I(2)),
tomo.AttrMinimumSize { X: 32, Y: 32 },
tomo.AttrColor { Color: colorCalendarDay },
), tomo.R("", "CalendarDay"), "weekday"),
// *.CalendarDay[weekend]
style.Rule {
Role: tomo.R("", "CalendarDay", "weekend"),
Default: style.AS (
style.AttrPadding(tomo.I(2)),
style.AttrMinimumSize { X: 32, Y: 32 },
style.AttrColor { Color: colorCalendarWeekend },
),
},
tomo.Ru(tomo.AS (
tomo.AttrPadding(tomo.I(2)),
tomo.AttrMinimumSize { X: 32, Y: 32 },
tomo.AttrColor { Color: colorCalendarWeekend },
), tomo.R("", "CalendarDay"), "weekend"),
// *.TabbedContainer[*]
style.Rule {
Role: tomo.R("", "TabbedContainer", ""),
Default: style.AS (
style.AttrGap { },
),
},
// *.TabbedContainer
tomo.Ru(tomo.AS (
tomo.AGap(0, 0),
), tomo.R("", "TabbedContainer")),
// *.TabRow[*]
style.Rule {
Role: tomo.R("", "TabRow", ""),
Default: style.AS (
style.AttrBorder {
tomo.Border {
Width: tomo.I(1, 1, 0, 1),
Color: borderColorOutline,
},
tomo.Border {
Width: tomo.I(1, 0, 0, 1),
Color: borderColorEngraved,
},
// *.TabRow
tomo.Ru(tomo.AS (
tomo.AttrBorder {
tomo.Border {
Width: tomo.I(1, 1, 0, 1),
Color: borderColorOutline,
},
style.AttrGap { X: 0, Y: 0 },
style.AttrColor { Color: colorGutter },
style.AttrPadding(tomo.I(1, 0, 0, 0)),
),
},
tomo.Border {
Width: tomo.I(1, 0, 0, 1),
Color: borderColorEngraved,
},
},
tomo.AttrGap { X: 0, Y: 0 },
tomo.AttrColor { Color: colorGutter },
tomo.AttrPadding(tomo.I(1, 0, 0, 0)),
), tomo.R("", "TabRow")),
// *.TabSpacer[left]
style.Rule {
Role: tomo.R("", "TabSpacer", "left"),
Default: style.AS (
style.AttrBorder {
tomo.Border {
Width: tomo.I(0, 0, 1, 0),
Color: borderColorEngraved,
},
tomo.Border {
Width: tomo.I(0, 0, 1, 0),
Color: borderColorOutline,
},
tomo.Ru(tomo.AS (
tomo.AttrBorder {
tomo.Border {
Width: tomo.I(0, 0, 1, 0),
Color: borderColorEngraved,
},
style.AttrMinimumSize { X: 1 },
),
},
tomo.Border {
Width: tomo.I(0, 0, 1, 0),
Color: borderColorOutline,
},
},
tomo.AttrMinimumSize { X: 1 },
), tomo.R("", "TabSpacer")),
// *.TabSpacer[right]
style.Rule {
Role: tomo.R("", "TabSpacer", "right"),
Default: style.AS (
style.AttrBorder {
tomo.Border {
Width: tomo.I(1, 0, 0, 0),
Color: [4]color.Color {
colorGutter, colorGutter,
colorGutter, colorGutter,
},
},
tomo.Border {
Width: tomo.I(0, 0, 1, 0),
Color: borderColorEngraved,
},
tomo.Border {
Width: tomo.I(0, 0, 1, 1),
Color: borderColorOutline,
},
tomo.Border {
Width: tomo.I(0, 0, 0, 1),
Color: borderColorShade,
tomo.Ru(tomo.AS (
tomo.AttrBorder {
tomo.Border {
Width: tomo.I(1, 0, 0, 0),
Color: [4]color.Color {
colorGutter, colorGutter,
colorGutter, colorGutter,
},
},
style.AttrMinimumSize { X: 3 },
),
},
tomo.Border {
Width: tomo.I(0, 0, 1, 0),
Color: borderColorEngraved,
},
tomo.Border {
Width: tomo.I(0, 0, 1, 1),
Color: borderColorOutline,
},
tomo.Border {
Width: tomo.I(0, 0, 0, 1),
Color: borderColorShade,
},
},
tomo.AttrMinimumSize { X: 3 },
), tomo.R("", "TabSpacer"), "right"),
// *.Tab[*]
style.Rule {
Role: tomo.R("", "Tab", ""),
Default: style.AS (
style.AttrBorder {
tomo.Border {
Width: tomo.I(1, 0, 0, 0),
Color: [4]color.Color {
colorGutter, colorGutter,
colorGutter, colorGutter,
},
},
tomo.Border {
Width: tomo.I(0, 0, 1, 0),
Color: borderColorEngraved,
},
tomo.Border {
Width: tomo.I(1, 0, 1, 1),
Color: borderColorOutline,
},
tomo.Border {
Width: tomo.I(1, 1, 0, 1),
Color: borderColorLifted,
// *.Tab
tomo.Ru(tomo.AS (
tomo.AttrBorder {
tomo.Border {
Width: tomo.I(1, 0, 0, 0),
Color: [4]color.Color {
colorGutter, colorGutter,
colorGutter, colorGutter,
},
},
style.AttrPadding(tomo.I(4, 8, 4, 8)),
style.AttrColor { Color: tomo.ColorRaised },
),
},
tomo.Border {
Width: tomo.I(0, 0, 1, 0),
Color: borderColorEngraved,
},
tomo.Border {
Width: tomo.I(1, 0, 1, 1),
Color: borderColorOutline,
},
tomo.Border {
Width: tomo.I(1, 1, 0, 1),
Color: borderColorLifted,
},
},
tomo.AttrPadding(tomo.I(4, 8, 4, 8)),
tomo.AttrColor { Color: tomo.ColorRaised },
), tomo.R("", "Tab")),
// *.Tab[active]
style.Rule {
Role: tomo.R("", "Tab", "active"),
Default: style.AS (
style.AttrBorder {
tomo.Border {
Width: tomo.I(1, 0, 0, 1),
Color: borderColorOutline,
},
tomo.Border {
Width: tomo.I(1, 1, 0, 1),
Color: borderColorLifted,
},
tomo.Ru(tomo.AS (
tomo.AttrBorder {
tomo.Border {
Width: tomo.I(1, 0, 0, 1),
Color: borderColorOutline,
},
style.AttrPadding(tomo.I(4, 8, 4, 8)),
style.AttrColor { Color: tomo.ColorBackground },
),
},
tomo.Border {
Width: tomo.I(1, 1, 0, 1),
Color: borderColorLifted,
},
},
tomo.AttrPadding(tomo.I(4, 8, 4, 8)),
tomo.AttrColor { Color: tomo.ColorBackground },
), tomo.R("", "Tab"), "active"),
// *.Swatch[*]
style.Rule {
Role: tomo.R("", "Swatch", ""),
Default: style.AS (
style.AttrBorder {
outline,
},
style.AttrMinimumSize { X: 19, Y: 19 },
),
Focused: style.AS (
style.AttrBorder {
outline,
tomo.Border {
Width: tomo.I(1),
Color: borderColorFocused,
},
},
),
},
// *.Swatch
tomo.Ru(tomo.AS (
tomo.AttrBorder {
outline,
},
tomo.AttrMinimumSize { X: 19, Y: 19 },
), tomo.R("", "Swatch")),
// *.ColorPickerMap[*]
style.Rule {
Role: tomo.R("", "ColorPickerMap", ""),
Default: style.AS (
style.AttrBorder {
outline,
tomo.Border {
Width: tomo.I(1, 0, 0, 1),
Color: borderColorEngraved,
},
// *.Swatch[focused]
tomo.Ru(tomo.AS (
tomo.AttrBorder {
outline,
tomo.Border {
Width: tomo.I(1),
Color: borderColorFocused,
},
style.AttrColor { Color: tomo.ColorSunken },
style.AttrMinimumSize { X: 128, Y: 128 },
),
},
},
), tomo.R("", "Swatch"), "focused"),
// *.ColorPickerMap
tomo.Ru(tomo.AS (
tomo.AttrBorder {
outline,
tomo.Border {
Width: tomo.I(1, 0, 0, 1),
Color: borderColorEngraved,
},
},
tomo.AttrColor { Color: tomo.ColorSunken },
tomo.AttrMinimumSize { X: 128, Y: 128 },
), tomo.R("", "ColorPickerMap")),
}

View File

@ -2,12 +2,12 @@ package fallbackStyle
import "image/color"
import "git.tebibyte.media/tomo/tomo"
import "git.tebibyte.media/tomo/nasin/internal/style"
// New returns Wintergreen, the default Tomo style. It is neutral-gray with
// green and turquoise accents.
func New () *style.Style {
return &style.Style {
func New () *tomo.Style {
return &tomo.Style {
Rules: rules,
Colors: map[tomo.Color] color.Color {
tomo.ColorBackground: colorBackground,
tomo.ColorForeground: colorForeground,
@ -15,6 +15,5 @@ func New () *style.Style {
tomo.ColorSunken: colorCarved,
tomo.ColorAccent: colorFocus,
},
Rules: rules,
}
}