Tweaked the sunken pattern

This commit is contained in:
Sasha Koshka 2023-01-17 18:12:04 -05:00
parent 0c2eb3f20d
commit b9be483869
2 changed files with 18 additions and 4 deletions

View File

@ -33,6 +33,16 @@ var pressedButtonPattern = artist.NewMultiBorder (
},
},
artist.Border { Stroke: artist.NewUniform(hex(0x8D9894FF)) })
var pressedSelectedButtonPattern = artist.NewMultiBorder (
artist.Border { Weight: 1, Stroke: strokePattern },
artist.Border {
Weight: 1,
Stroke: artist.Chiseled {
Highlight: artist.NewUniform(hex(0x4B5B59FF)),
Shadow: artist.NewUniform(hex(0x8D9894FF)),
},
},
artist.Border { Stroke: artist.NewUniform(hex(0x8D9894FF)) })
var disabledButtonPattern = artist.NewMultiBorder (
artist.Border { Weight: 1, Stroke: weakForegroundPattern },
artist.Border { Stroke: backgroundPattern })
@ -40,7 +50,11 @@ var disabledButtonPattern = artist.NewMultiBorder (
func ButtonPattern (enabled, selected, pressed bool) (artist.Pattern) {
if enabled {
if pressed {
return pressedButtonPattern
if selected {
return pressedSelectedButtonPattern
} else {
return pressedButtonPattern
}
} else {
if selected {
return selectedButtonPattern

View File

@ -28,11 +28,11 @@ var sunkenPattern = artist.NewMultiBorder (
artist.Border {
Weight: 1,
Stroke: artist.Chiseled {
Highlight: artist.NewUniform(hex(0x373C3AFF)),
Shadow: artist.NewUniform(hex(0xDBDBDBFF)),
Highlight: artist.NewUniform(hex(0x3b534eFF)),
Shadow: artist.NewUniform(hex(0x97a09cFF)),
},
},
artist.Border { Stroke: backgroundPattern })
artist.Border { Stroke: artist.NewUniform(hex(0x97a09cFF)) })
func AccentPattern () (artist.Pattern) { return accentPattern }
func BackgroundPattern () (artist.Pattern) { return backgroundPattern }