Add styling for tabs to Wintergreen
This commit is contained in:
parent
fb3d3b0919
commit
26179d8ff7
@ -20,6 +20,7 @@ var colorOutline = color.Black
|
||||
var colorCalendarWeekdayHeader = color.RGBA { R: 194, G: 162, B: 132, A: 255 }
|
||||
var colorCalendarWeekend = color.RGBA { R: 165, G: 185, B: 120, A: 255 }
|
||||
var colorCalendarDay = color.RGBA { R: 194, G: 189, B: 132, A: 255 }
|
||||
var colorInactive = color.RGBA { R: 131, G: 147, B: 134, A: 255 }
|
||||
|
||||
var outline = tomo.Border {
|
||||
Width: tomo.I(1),
|
||||
@ -31,11 +32,12 @@ var outline = tomo.Border {
|
||||
},
|
||||
}
|
||||
|
||||
var borderColorEngraved = [4]color.Color { colorShadow, colorHighlight, colorHighlight, colorShadow }
|
||||
var borderColorLifted = [4]color.Color { colorHighlight, colorShadow, colorShadow, colorHighlight }
|
||||
var borderColorOutline = [4]color.Color { colorOutline, colorOutline, colorOutline, colorOutline }
|
||||
var borderColorEngraved = [4]color.Color { colorShadow, colorHighlight, colorHighlight, colorShadow }
|
||||
var borderColorLifted = [4]color.Color { colorHighlight, colorShadow, colorShadow, colorHighlight }
|
||||
var borderColorInput = [4]color.Color { colorInputShadow, colorInput, colorInput, colorInputShadow }
|
||||
var borderColorFocused = [4]color.Color { colorFocus, colorFocus, colorFocus, colorFocus }
|
||||
var borderColorShade = [4]color.Color { colorShade, colorShade, colorShade, colorShade }
|
||||
var borderColorFocused = [4]color.Color { colorFocus, colorFocus, colorFocus, colorFocus }
|
||||
var borderColorShade = [4]color.Color { colorShade, colorShade, colorShade, colorShade }
|
||||
|
||||
var rules = []style.Rule {
|
||||
// *.*[*]
|
||||
@ -277,14 +279,6 @@ var rules = []style.Rule {
|
||||
),
|
||||
},
|
||||
|
||||
// *.LabelCheckbox[*]
|
||||
style.Rule {
|
||||
Role: tomo.R("", "LabelCheckbox", ""),
|
||||
Default: style.AS (
|
||||
style.AttrGap { X: 8, Y: 8 },
|
||||
),
|
||||
},
|
||||
|
||||
// *.MenuItem[*]
|
||||
style.Rule {
|
||||
Role: tomo.R("", "MenuItem", ""),
|
||||
@ -401,4 +395,164 @@ var rules = []style.Rule {
|
||||
style.AttrColor { Color: colorCalendarWeekend },
|
||||
),
|
||||
},
|
||||
|
||||
// *.TabbedContainer[*]
|
||||
style.Rule {
|
||||
Role: tomo.R("", "TabbedContainer", ""),
|
||||
Default: style.AS (
|
||||
style.AttrGap { },
|
||||
),
|
||||
},
|
||||
|
||||
// *.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,
|
||||
},
|
||||
},
|
||||
style.AttrGap { X: 0, Y: 0 },
|
||||
style.AttrColor { Color: colorGutter },
|
||||
style.AttrPadding(tomo.I(1, 0, 0, 0)),
|
||||
),
|
||||
},
|
||||
|
||||
// *.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,
|
||||
},
|
||||
},
|
||||
style.AttrMinimumSize { X: 1 },
|
||||
),
|
||||
},
|
||||
|
||||
// *.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,
|
||||
},
|
||||
},
|
||||
style.AttrMinimumSize { X: 3 },
|
||||
),
|
||||
},
|
||||
|
||||
// *.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,
|
||||
},
|
||||
},
|
||||
style.AttrPadding(tomo.I(4, 8, 4, 8)),
|
||||
style.AttrColor { Color: tomo.ColorRaised },
|
||||
),
|
||||
},
|
||||
|
||||
// *.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,
|
||||
},
|
||||
},
|
||||
style.AttrPadding(tomo.I(4, 8, 4, 8)),
|
||||
style.AttrColor { Color: tomo.ColorBackground },
|
||||
),
|
||||
},
|
||||
|
||||
// *.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,
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
|
||||
// *.ColorPickerMap[*]
|
||||
style.Rule {
|
||||
Role: tomo.R("", "ColorPickerMap", ""),
|
||||
Default: style.AS (
|
||||
style.AttrBorder {
|
||||
outline,
|
||||
tomo.Border {
|
||||
Width: tomo.I(1, 0, 0, 1),
|
||||
Color: borderColorEngraved,
|
||||
},
|
||||
},
|
||||
style.AttrColor { Color: tomo.ColorSunken },
|
||||
style.AttrMinimumSize { X: 128, Y: 128 },
|
||||
),
|
||||
},
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user