Update fallback style
This commit is contained in:
parent
fee4e584e7
commit
1feb5f4ab1
@ -7,8 +7,8 @@ import _ "embed"
|
|||||||
import _ "image/png"
|
import _ "image/png"
|
||||||
import "image/color"
|
import "image/color"
|
||||||
import "git.tebibyte.media/tomo/tomo"
|
import "git.tebibyte.media/tomo/tomo"
|
||||||
import "golang.org/x/image/font/basicfont"
|
|
||||||
import "git.tebibyte.media/tomo/tomo/event"
|
import "git.tebibyte.media/tomo/tomo/event"
|
||||||
|
import "git.tebibyte.media/tomo/backend/style"
|
||||||
|
|
||||||
var colorFocus = color.RGBA { R: 61, G: 128, B: 143, A: 255 }
|
var colorFocus = color.RGBA { R: 61, G: 128, B: 143, A: 255 }
|
||||||
var colorInput = color.RGBA { R: 208, G: 203, B: 150, A: 255 }
|
var colorInput = color.RGBA { R: 208, G: 203, B: 150, A: 255 }
|
||||||
@ -55,7 +55,7 @@ func newCloserCookie (closer io.Closer) event.Cookie {
|
|||||||
|
|
||||||
// New returns Wintergreen, the default Tomo style. It is neutral-gray with
|
// New returns Wintergreen, the default Tomo style. It is neutral-gray with
|
||||||
// green and turquoise accents.
|
// green and turquoise accents.
|
||||||
func New () (*tomo.Style, event.Cookie) {
|
func New () (*style.Style, event.Cookie) {
|
||||||
atlasImage, _, err := image.Decode(bytes.NewReader(atlasBytes))
|
atlasImage, _, err := image.Decode(bytes.NewReader(atlasBytes))
|
||||||
if err != nil { panic(err) }
|
if err != nil { panic(err) }
|
||||||
atlasTexture := tomo.NewTexture(atlasImage)
|
atlasTexture := tomo.NewTexture(atlasImage)
|
||||||
@ -68,17 +68,16 @@ func New () (*tomo.Style, event.Cookie) {
|
|||||||
|
|
||||||
cookie := event.MultiCookie(newCloserCookie(atlasTexture))
|
cookie := event.MultiCookie(newCloserCookie(atlasTexture))
|
||||||
|
|
||||||
rules := []tomo.Rule {
|
rules := []style.Rule {
|
||||||
// *.*
|
// *.*
|
||||||
tomo.Ru(tomo.AS (
|
style.Ru(style.AS (
|
||||||
tomo.AFace (basicfont.Face7x13 ),
|
|
||||||
tomo.ATextColor (tomo.ColorForeground),
|
tomo.ATextColor (tomo.ColorForeground),
|
||||||
tomo.ADotColor (tomo.ColorAccent ),
|
tomo.ADotColor (tomo.ColorAccent ),
|
||||||
tomo.AGap (8, 8 ),
|
tomo.AGap (8, 8 ),
|
||||||
), tomo.R("", "")),
|
), tomo.R("", "")),
|
||||||
|
|
||||||
// *.Button
|
// *.Button
|
||||||
tomo.Ru(tomo.AS (
|
style.Ru(style.AS (
|
||||||
tomo.AttrBorder {
|
tomo.AttrBorder {
|
||||||
outline,
|
outline,
|
||||||
tomo.Border {
|
tomo.Border {
|
||||||
@ -91,7 +90,7 @@ rules := []tomo.Rule {
|
|||||||
), tomo.R("", "Button")),
|
), tomo.R("", "Button")),
|
||||||
|
|
||||||
// *.Button[focused]
|
// *.Button[focused]
|
||||||
tomo.Ru(tomo.AS (
|
style.Ru(style.AS (
|
||||||
tomo.AttrBorder {
|
tomo.AttrBorder {
|
||||||
outline,
|
outline,
|
||||||
tomo.Border {
|
tomo.Border {
|
||||||
@ -102,7 +101,7 @@ rules := []tomo.Rule {
|
|||||||
), tomo.R("", "Button"), "focused"),
|
), tomo.R("", "Button"), "focused"),
|
||||||
|
|
||||||
// *.Button[pressed]
|
// *.Button[pressed]
|
||||||
tomo.Ru(tomo.AS (
|
style.Ru(style.AS (
|
||||||
tomo.AttrBorder {
|
tomo.AttrBorder {
|
||||||
outline,
|
outline,
|
||||||
tomo.Border {
|
tomo.Border {
|
||||||
@ -115,7 +114,7 @@ rules := []tomo.Rule {
|
|||||||
), tomo.R("", "Button"), "pressed"),
|
), tomo.R("", "Button"), "pressed"),
|
||||||
|
|
||||||
// *.TextInput
|
// *.TextInput
|
||||||
tomo.Ru(tomo.AS (
|
style.Ru(style.AS (
|
||||||
tomo.ABorder (
|
tomo.ABorder (
|
||||||
outline,
|
outline,
|
||||||
tomo.Border {
|
tomo.Border {
|
||||||
@ -127,7 +126,7 @@ rules := []tomo.Rule {
|
|||||||
), tomo.R("", "TextInput")),
|
), tomo.R("", "TextInput")),
|
||||||
|
|
||||||
// *.TextInput[focused]
|
// *.TextInput[focused]
|
||||||
tomo.Ru(tomo.AS (
|
style.Ru(style.AS (
|
||||||
tomo.ABorder (
|
tomo.ABorder (
|
||||||
outline,
|
outline,
|
||||||
tomo.Border {
|
tomo.Border {
|
||||||
@ -137,7 +136,7 @@ rules := []tomo.Rule {
|
|||||||
), tomo.R("", "TextInput"), "focused"),
|
), tomo.R("", "TextInput"), "focused"),
|
||||||
|
|
||||||
// *.TextView
|
// *.TextView
|
||||||
tomo.Ru(tomo.AS (
|
style.Ru(style.AS (
|
||||||
tomo.ABorder (
|
tomo.ABorder (
|
||||||
outline,
|
outline,
|
||||||
tomo.Border {
|
tomo.Border {
|
||||||
@ -149,12 +148,12 @@ rules := []tomo.Rule {
|
|||||||
), tomo.R("", "TextView")),
|
), tomo.R("", "TextView")),
|
||||||
|
|
||||||
// *.NumberInput
|
// *.NumberInput
|
||||||
tomo.Ru(tomo.AS (
|
style.Ru(style.AS (
|
||||||
tomo.AGap(0, 0),
|
tomo.AGap(0, 0),
|
||||||
), tomo.R("", "NumberInput")),
|
), tomo.R("", "NumberInput")),
|
||||||
|
|
||||||
// *.Container[sunken]
|
// *.Container[sunken]
|
||||||
tomo.Ru(tomo.AS (
|
style.Ru(style.AS (
|
||||||
tomo.ABorder (
|
tomo.ABorder (
|
||||||
outline,
|
outline,
|
||||||
tomo.Border {
|
tomo.Border {
|
||||||
@ -167,13 +166,13 @@ rules := []tomo.Rule {
|
|||||||
), tomo.R("", "Container"), "sunken"),
|
), tomo.R("", "Container"), "sunken"),
|
||||||
|
|
||||||
// *.Container[outer]
|
// *.Container[outer]
|
||||||
tomo.Ru(tomo.AS (
|
style.Ru(style.AS (
|
||||||
tomo.AttrColor { Color: tomo.ColorBackground },
|
tomo.AttrColor { Color: tomo.ColorBackground },
|
||||||
tomo.AttrPadding(tomo.I(8)),
|
tomo.AttrPadding(tomo.I(8)),
|
||||||
), tomo.R("", "Container"), "outer"),
|
), tomo.R("", "Container"), "outer"),
|
||||||
|
|
||||||
// *.Container[menu]
|
// *.Container[menu]
|
||||||
tomo.Ru(tomo.AS (
|
style.Ru(style.AS (
|
||||||
tomo.AttrBorder {
|
tomo.AttrBorder {
|
||||||
outline,
|
outline,
|
||||||
tomo.Border {
|
tomo.Border {
|
||||||
@ -186,12 +185,12 @@ rules := []tomo.Rule {
|
|||||||
), tomo.R("", "Container"), "menu"),
|
), tomo.R("", "Container"), "menu"),
|
||||||
|
|
||||||
// *.Heading
|
// *.Heading
|
||||||
tomo.Ru(tomo.AS (
|
style.Ru(style.AS (
|
||||||
tomo.AAlign(tomo.AlignMiddle, tomo.AlignMiddle),
|
tomo.AAlign(tomo.AlignMiddle, tomo.AlignMiddle),
|
||||||
), tomo.R("", "Heading")),
|
), tomo.R("", "Heading")),
|
||||||
|
|
||||||
// *.Separator
|
// *.Separator
|
||||||
tomo.Ru(tomo.AS (
|
style.Ru(style.AS (
|
||||||
tomo.AttrBorder {
|
tomo.AttrBorder {
|
||||||
tomo.Border {
|
tomo.Border {
|
||||||
Width: tomo.I(1),
|
Width: tomo.I(1),
|
||||||
@ -201,7 +200,7 @@ rules := []tomo.Rule {
|
|||||||
), tomo.R("", "Separator")),
|
), tomo.R("", "Separator")),
|
||||||
|
|
||||||
// *.Slider
|
// *.Slider
|
||||||
tomo.Ru(tomo.AS (
|
style.Ru(style.AS (
|
||||||
tomo.AttrBorder {
|
tomo.AttrBorder {
|
||||||
outline,
|
outline,
|
||||||
tomo.Border {
|
tomo.Border {
|
||||||
@ -214,7 +213,7 @@ rules := []tomo.Rule {
|
|||||||
), tomo.R("", "Slider")),
|
), tomo.R("", "Slider")),
|
||||||
|
|
||||||
// *.Slider[focused]
|
// *.Slider[focused]
|
||||||
tomo.Ru(tomo.AS (
|
style.Ru(style.AS (
|
||||||
tomo.ABorder (
|
tomo.ABorder (
|
||||||
outline,
|
outline,
|
||||||
tomo.Border {
|
tomo.Border {
|
||||||
@ -225,17 +224,17 @@ rules := []tomo.Rule {
|
|||||||
), tomo.R("", "Slider"), "focused"),
|
), tomo.R("", "Slider"), "focused"),
|
||||||
|
|
||||||
// *.Slider[horizontal]
|
// *.Slider[horizontal]
|
||||||
tomo.Ru(tomo.AS (
|
style.Ru(style.AS (
|
||||||
tomo.AMinimumSize(48, 0),
|
tomo.AMinimumSize(48, 0),
|
||||||
), tomo.R("", "Slider"), "horizontal"),
|
), tomo.R("", "Slider"), "horizontal"),
|
||||||
|
|
||||||
// *.Slider[vertical]
|
// *.Slider[vertical]
|
||||||
tomo.Ru(tomo.AS (
|
style.Ru(style.AS (
|
||||||
tomo.AMinimumSize(0, 48),
|
tomo.AMinimumSize(0, 48),
|
||||||
), tomo.R("", "Slider"), "vertical"),
|
), tomo.R("", "Slider"), "vertical"),
|
||||||
|
|
||||||
// *.SliderHandle
|
// *.SliderHandle
|
||||||
tomo.Ru(tomo.AS (
|
style.Ru(style.AS (
|
||||||
tomo.ABorder (
|
tomo.ABorder (
|
||||||
outline,
|
outline,
|
||||||
tomo.Border {
|
tomo.Border {
|
||||||
@ -255,17 +254,17 @@ rules := []tomo.Rule {
|
|||||||
), tomo.R("", "SliderHandle")),
|
), tomo.R("", "SliderHandle")),
|
||||||
|
|
||||||
// *.SliderHandle[horizontal]
|
// *.SliderHandle[horizontal]
|
||||||
tomo.Ru(tomo.AS (
|
style.Ru(style.AS (
|
||||||
tomo.ATexture(textureHandleHorizontal),
|
tomo.ATexture(textureHandleHorizontal),
|
||||||
), tomo.R("", "SliderHandle"), "horizontal"),
|
), tomo.R("", "SliderHandle"), "horizontal"),
|
||||||
|
|
||||||
// *.ScrollContainer
|
// *.ScrollContainer
|
||||||
tomo.Ru(tomo.AS (
|
style.Ru(style.AS (
|
||||||
tomo.AGap(0, 0),
|
tomo.AGap(0, 0),
|
||||||
), tomo.R("", "ScrollContainer")),
|
), tomo.R("", "ScrollContainer")),
|
||||||
|
|
||||||
// *.Checkbox
|
// *.Checkbox
|
||||||
tomo.Ru(tomo.AS (
|
style.Ru(style.AS (
|
||||||
tomo.ABorder (
|
tomo.ABorder (
|
||||||
outline,
|
outline,
|
||||||
tomo.Border {
|
tomo.Border {
|
||||||
@ -280,7 +279,7 @@ rules := []tomo.Rule {
|
|||||||
), tomo.R("", "Checkbox")),
|
), tomo.R("", "Checkbox")),
|
||||||
|
|
||||||
// *.Checkbox[focused]
|
// *.Checkbox[focused]
|
||||||
tomo.Ru(tomo.AS (
|
style.Ru(style.AS (
|
||||||
tomo.ABorder (
|
tomo.ABorder (
|
||||||
outline,
|
outline,
|
||||||
tomo.Border {
|
tomo.Border {
|
||||||
@ -291,39 +290,39 @@ rules := []tomo.Rule {
|
|||||||
), tomo.R("", "Checkbox"), "focused"),
|
), tomo.R("", "Checkbox"), "focused"),
|
||||||
|
|
||||||
// *.Checkbox[checked]
|
// *.Checkbox[checked]
|
||||||
tomo.Ru(tomo.AS (
|
style.Ru(style.AS (
|
||||||
tomo.ATexture(textureCheckboxChecked),
|
tomo.ATexture(textureCheckboxChecked),
|
||||||
), tomo.R("", "Checkbox"), "checked"),
|
), tomo.R("", "Checkbox"), "checked"),
|
||||||
|
|
||||||
// *.MenuItem
|
// *.MenuItem
|
||||||
tomo.Ru(tomo.AS (
|
style.Ru(style.AS (
|
||||||
tomo.AttrPadding(tomo.I(4)),
|
tomo.AttrPadding(tomo.I(4)),
|
||||||
tomo.AttrGap { X: 4, Y: 4 },
|
tomo.AttrGap { X: 4, Y: 4 },
|
||||||
tomo.AttrColor { Color: color.Transparent },
|
tomo.AttrColor { Color: color.Transparent },
|
||||||
), tomo.R("", "MenuItem")),
|
), tomo.R("", "MenuItem")),
|
||||||
|
|
||||||
// *MenuItem[focused]
|
// *MenuItem[focused]
|
||||||
tomo.Ru(tomo.AS (
|
style.Ru(style.AS (
|
||||||
tomo.AttrColor { Color: tomo.ColorAccent },
|
tomo.AttrColor { Color: tomo.ColorAccent },
|
||||||
), tomo.R("", "MenuItem"), "focused"),
|
), tomo.R("", "MenuItem"), "focused"),
|
||||||
|
|
||||||
// *.MenuItem[hovered]
|
// *.MenuItem[hovered]
|
||||||
tomo.Ru(tomo.AS (
|
style.Ru(style.AS (
|
||||||
tomo.AttrColor { Color: tomo.ColorAccent },
|
tomo.AttrColor { Color: tomo.ColorAccent },
|
||||||
), tomo.R("", "MenuItem"), "hovered"),
|
), tomo.R("", "MenuItem"), "hovered"),
|
||||||
|
|
||||||
// *.File
|
// *.File
|
||||||
tomo.Ru(tomo.AS (
|
style.Ru(style.AS (
|
||||||
tomo.AttrColor { Color: color.Transparent },
|
tomo.AttrColor { Color: color.Transparent },
|
||||||
), tomo.R("", "File")),
|
), tomo.R("", "File")),
|
||||||
|
|
||||||
// *.File[focused]
|
// *.File[focused]
|
||||||
tomo.Ru(tomo.AS (
|
style.Ru(style.AS (
|
||||||
tomo.AttrColor { Color: tomo.ColorAccent },
|
tomo.AttrColor { Color: tomo.ColorAccent },
|
||||||
), tomo.R("", "File"), "focused"),
|
), tomo.R("", "File"), "focused"),
|
||||||
|
|
||||||
// *.TearLine
|
// *.TearLine
|
||||||
tomo.Ru(tomo.AS (
|
style.Ru(style.AS (
|
||||||
tomo.ABorder (
|
tomo.ABorder (
|
||||||
tomo.Border {
|
tomo.Border {
|
||||||
Width: tomo.I(3),
|
Width: tomo.I(3),
|
||||||
@ -339,7 +338,7 @@ rules := []tomo.Rule {
|
|||||||
), tomo.R("", "TearLine")),
|
), tomo.R("", "TearLine")),
|
||||||
|
|
||||||
// *.TearLine[focused]
|
// *.TearLine[focused]
|
||||||
tomo.Ru(tomo.AS (
|
style.Ru(style.AS (
|
||||||
tomo.AttrBorder {
|
tomo.AttrBorder {
|
||||||
tomo.Border {
|
tomo.Border {
|
||||||
Width: tomo.I(3),
|
Width: tomo.I(3),
|
||||||
@ -349,7 +348,7 @@ rules := []tomo.Rule {
|
|||||||
), tomo.R("", "TearLine"), "focused"),
|
), tomo.R("", "TearLine"), "focused"),
|
||||||
|
|
||||||
// *.TearLine[hovered]
|
// *.TearLine[hovered]
|
||||||
tomo.Ru(tomo.AS (
|
style.Ru(style.AS (
|
||||||
tomo.AttrBorder {
|
tomo.AttrBorder {
|
||||||
tomo.Border {
|
tomo.Border {
|
||||||
Width: tomo.I(3),
|
Width: tomo.I(3),
|
||||||
@ -359,7 +358,7 @@ rules := []tomo.Rule {
|
|||||||
), tomo.R("", "TearLine"), "hovered"),
|
), tomo.R("", "TearLine"), "hovered"),
|
||||||
|
|
||||||
// *.Calendar
|
// *.Calendar
|
||||||
tomo.Ru(tomo.AS (
|
style.Ru(style.AS (
|
||||||
tomo.AttrBorder {
|
tomo.AttrBorder {
|
||||||
tomo.Border {
|
tomo.Border {
|
||||||
Width: tomo.I(0, 1, 1, 0),
|
Width: tomo.I(0, 1, 1, 0),
|
||||||
@ -373,37 +372,37 @@ rules := []tomo.Rule {
|
|||||||
), tomo.R("", "Calendar")),
|
), tomo.R("", "Calendar")),
|
||||||
|
|
||||||
// *.CalendarGrid
|
// *.CalendarGrid
|
||||||
tomo.Ru(tomo.AS (
|
style.Ru(style.AS (
|
||||||
tomo.AttrGap { X: 2, Y: 2 },
|
tomo.AttrGap { X: 2, Y: 2 },
|
||||||
), tomo.R("", "CalendarGrid")),
|
), tomo.R("", "CalendarGrid")),
|
||||||
|
|
||||||
// *.CalendarWeekdayHeader
|
// *.CalendarWeekdayHeader
|
||||||
tomo.Ru(tomo.AS (
|
style.Ru(style.AS (
|
||||||
tomo.AttrPadding(tomo.I(2)),
|
tomo.AttrPadding(tomo.I(2)),
|
||||||
tomo.AttrColor { Color: colorCalendarWeekdayHeader },
|
tomo.AttrColor { Color: colorCalendarWeekdayHeader },
|
||||||
), tomo.R("", "CalendarWeekdayHeader")),
|
), tomo.R("", "CalendarWeekdayHeader")),
|
||||||
|
|
||||||
// *.CalendarDay[weekday]
|
// *.CalendarDay[weekday]
|
||||||
tomo.Ru(tomo.AS (
|
style.Ru(style.AS (
|
||||||
tomo.AttrPadding(tomo.I(2)),
|
tomo.AttrPadding(tomo.I(2)),
|
||||||
tomo.AttrMinimumSize { X: 32, Y: 32 },
|
tomo.AttrMinimumSize { X: 32, Y: 32 },
|
||||||
tomo.AttrColor { Color: colorCalendarDay },
|
tomo.AttrColor { Color: colorCalendarDay },
|
||||||
), tomo.R("", "CalendarDay"), "weekday"),
|
), tomo.R("", "CalendarDay"), "weekday"),
|
||||||
|
|
||||||
// *.CalendarDay[weekend]
|
// *.CalendarDay[weekend]
|
||||||
tomo.Ru(tomo.AS (
|
style.Ru(style.AS (
|
||||||
tomo.AttrPadding(tomo.I(2)),
|
tomo.AttrPadding(tomo.I(2)),
|
||||||
tomo.AttrMinimumSize { X: 32, Y: 32 },
|
tomo.AttrMinimumSize { X: 32, Y: 32 },
|
||||||
tomo.AttrColor { Color: colorCalendarWeekend },
|
tomo.AttrColor { Color: colorCalendarWeekend },
|
||||||
), tomo.R("", "CalendarDay"), "weekend"),
|
), tomo.R("", "CalendarDay"), "weekend"),
|
||||||
|
|
||||||
// *.TabbedContainer
|
// *.TabbedContainer
|
||||||
tomo.Ru(tomo.AS (
|
style.Ru(style.AS (
|
||||||
tomo.AGap(0, 0),
|
tomo.AGap(0, 0),
|
||||||
), tomo.R("", "TabbedContainer")),
|
), tomo.R("", "TabbedContainer")),
|
||||||
|
|
||||||
// *.TabRow
|
// *.TabRow
|
||||||
tomo.Ru(tomo.AS (
|
style.Ru(style.AS (
|
||||||
tomo.AttrBorder {
|
tomo.AttrBorder {
|
||||||
tomo.Border {
|
tomo.Border {
|
||||||
Width: tomo.I(1, 1, 0, 1),
|
Width: tomo.I(1, 1, 0, 1),
|
||||||
@ -420,7 +419,7 @@ rules := []tomo.Rule {
|
|||||||
), tomo.R("", "TabRow")),
|
), tomo.R("", "TabRow")),
|
||||||
|
|
||||||
// *.TabSpacer[left]
|
// *.TabSpacer[left]
|
||||||
tomo.Ru(tomo.AS (
|
style.Ru(style.AS (
|
||||||
tomo.AttrBorder {
|
tomo.AttrBorder {
|
||||||
tomo.Border {
|
tomo.Border {
|
||||||
Width: tomo.I(0, 0, 1, 0),
|
Width: tomo.I(0, 0, 1, 0),
|
||||||
@ -435,7 +434,7 @@ rules := []tomo.Rule {
|
|||||||
), tomo.R("", "TabSpacer")),
|
), tomo.R("", "TabSpacer")),
|
||||||
|
|
||||||
// *.TabSpacer[right]
|
// *.TabSpacer[right]
|
||||||
tomo.Ru(tomo.AS (
|
style.Ru(style.AS (
|
||||||
tomo.AttrBorder {
|
tomo.AttrBorder {
|
||||||
tomo.Border {
|
tomo.Border {
|
||||||
Width: tomo.I(1, 0, 0, 0),
|
Width: tomo.I(1, 0, 0, 0),
|
||||||
@ -461,7 +460,7 @@ rules := []tomo.Rule {
|
|||||||
), tomo.R("", "TabSpacer"), "right"),
|
), tomo.R("", "TabSpacer"), "right"),
|
||||||
|
|
||||||
// *.Tab
|
// *.Tab
|
||||||
tomo.Ru(tomo.AS (
|
style.Ru(style.AS (
|
||||||
tomo.AttrBorder {
|
tomo.AttrBorder {
|
||||||
tomo.Border {
|
tomo.Border {
|
||||||
Width: tomo.I(1, 0, 0, 0),
|
Width: tomo.I(1, 0, 0, 0),
|
||||||
@ -488,7 +487,7 @@ rules := []tomo.Rule {
|
|||||||
), tomo.R("", "Tab")),
|
), tomo.R("", "Tab")),
|
||||||
|
|
||||||
// *.Tab[active]
|
// *.Tab[active]
|
||||||
tomo.Ru(tomo.AS (
|
style.Ru(style.AS (
|
||||||
tomo.AttrBorder {
|
tomo.AttrBorder {
|
||||||
tomo.Border {
|
tomo.Border {
|
||||||
Width: tomo.I(1, 0, 0, 1),
|
Width: tomo.I(1, 0, 0, 1),
|
||||||
@ -504,7 +503,7 @@ rules := []tomo.Rule {
|
|||||||
), tomo.R("", "Tab"), "active"),
|
), tomo.R("", "Tab"), "active"),
|
||||||
|
|
||||||
// *.Swatch
|
// *.Swatch
|
||||||
tomo.Ru(tomo.AS (
|
style.Ru(style.AS (
|
||||||
tomo.AttrBorder {
|
tomo.AttrBorder {
|
||||||
outline,
|
outline,
|
||||||
},
|
},
|
||||||
@ -512,7 +511,7 @@ rules := []tomo.Rule {
|
|||||||
), tomo.R("", "Swatch")),
|
), tomo.R("", "Swatch")),
|
||||||
|
|
||||||
// *.Swatch[focused]
|
// *.Swatch[focused]
|
||||||
tomo.Ru(tomo.AS (
|
style.Ru(style.AS (
|
||||||
tomo.AttrBorder {
|
tomo.AttrBorder {
|
||||||
outline,
|
outline,
|
||||||
tomo.Border {
|
tomo.Border {
|
||||||
@ -523,7 +522,7 @@ rules := []tomo.Rule {
|
|||||||
), tomo.R("", "Swatch"), "focused"),
|
), tomo.R("", "Swatch"), "focused"),
|
||||||
|
|
||||||
// *.ColorPickerMap
|
// *.ColorPickerMap
|
||||||
tomo.Ru(tomo.AS (
|
style.Ru(style.AS (
|
||||||
tomo.AttrBorder {
|
tomo.AttrBorder {
|
||||||
outline,
|
outline,
|
||||||
tomo.Border {
|
tomo.Border {
|
||||||
@ -536,7 +535,7 @@ rules := []tomo.Rule {
|
|||||||
), tomo.R("", "ColorPickerMap")),
|
), tomo.R("", "ColorPickerMap")),
|
||||||
}
|
}
|
||||||
|
|
||||||
return &tomo.Style {
|
return &style.Style {
|
||||||
Rules: rules,
|
Rules: rules,
|
||||||
Colors: map[tomo.Color] color.Color {
|
Colors: map[tomo.Color] color.Color {
|
||||||
tomo.ColorBackground: colorBackground,
|
tomo.ColorBackground: colorBackground,
|
||||||
|
Loading…
Reference in New Issue
Block a user