Hot themeing tweaks

This commit is contained in:
Sasha Koshka 2023-02-14 17:21:05 -05:00
parent d59b7d812d
commit 4d87972235
3 changed files with 21 additions and 4 deletions

View File

@ -460,7 +460,6 @@ func (element *List) draw () {
0, 0, 0, 0,
innerBounds.Dx(), element.contentHeight, innerBounds.Dx(), element.contentHeight,
).Add(innerBounds.Min).Intersect(innerBounds) ).Add(innerBounds.Min).Intersect(innerBounds)
pattern := element.theme.Pattern(theme.PatternSunken, state) pattern := element.theme.Pattern(theme.PatternSunken, state)
tiles := shatter.Shatter(bounds, covered) tiles := shatter.Shatter(bounds, covered)
for _, tile := range tiles { for _, tile := range tiles {

View File

@ -144,11 +144,19 @@ func (Default) Pattern (
} }
} }
case PatternGutter: case PatternGutter:
if c == C("basic", "sliderVertical") || c == C("basic", "sliderHorizontal") {
if state.Disabled {
return disabledThinScrollGutterPattern
} else {
return thinScrollGutterPattern
}
} else {
if state.Disabled { if state.Disabled {
return disabledScrollGutterPattern return disabledScrollGutterPattern
} else { } else {
return scrollGutterPattern return scrollGutterPattern
} }
}
case PatternHandle: case PatternHandle:
if state.Disabled { if state.Disabled {
return disabledScrollBarPattern return disabledScrollBarPattern

View File

@ -207,9 +207,19 @@ var scrollGutterPattern = artist.NewMultiBordered (
}, },
}, },
artist.Stroke { Pattern: artist.NewUniform(hex(0x6e8079FF)) }) artist.Stroke { Pattern: artist.NewUniform(hex(0x6e8079FF)) })
var thinScrollGutterPattern = artist.Padded {
Fill: scrollGutterPattern,
Stroke: sunkenPattern,
Sides: []int{ 6, 6, 6, 6 },
}
var disabledScrollGutterPattern = artist.NewMultiBordered ( var disabledScrollGutterPattern = artist.NewMultiBordered (
artist.Stroke { Weight: 1, Pattern: weakForegroundPattern }, artist.Stroke { Weight: 1, Pattern: weakForegroundPattern },
artist.Stroke { Pattern: backgroundPattern }) artist.Stroke { Pattern: backgroundPattern })
var disabledThinScrollGutterPattern = artist.Padded {
Fill: disabledScrollGutterPattern,
Stroke: disabledButtonPattern,
Sides: []int{ 6, 6, 6, 6},
}
var scrollBarPattern = artist.NewMultiBordered ( var scrollBarPattern = artist.NewMultiBordered (
artist.Stroke { Weight: 1, Pattern: strokePattern }, artist.Stroke { Weight: 1, Pattern: strokePattern },
artist.Stroke { artist.Stroke {