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,
innerBounds.Dx(), element.contentHeight,
).Add(innerBounds.Min).Intersect(innerBounds)
pattern := element.theme.Pattern(theme.PatternSunken, state)
tiles := shatter.Shatter(bounds, covered)
for _, tile := range tiles {

View File

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

View File

@ -207,9 +207,19 @@ var scrollGutterPattern = artist.NewMultiBordered (
},
},
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 (
artist.Stroke { Weight: 1, Pattern: weakForegroundPattern },
artist.Stroke { Pattern: backgroundPattern })
var disabledThinScrollGutterPattern = artist.Padded {
Fill: disabledScrollGutterPattern,
Stroke: disabledButtonPattern,
Sides: []int{ 6, 6, 6, 6},
}
var scrollBarPattern = artist.NewMultiBordered (
artist.Stroke { Weight: 1, Pattern: strokePattern },
artist.Stroke {