2023-01-17 21:38:57 +00:00
|
|
|
package theme
|
|
|
|
|
|
|
|
import "git.tebibyte.media/sashakoshka/tomo/artist"
|
|
|
|
|
2023-01-21 00:24:21 +00:00
|
|
|
var buttonPattern = artist.NewMultiBordered (
|
2023-01-21 00:07:16 +00:00
|
|
|
artist.Stroke { Weight: 1, Pattern: strokePattern },
|
|
|
|
artist.Stroke {
|
2023-01-17 21:38:57 +00:00
|
|
|
Weight: 1,
|
2023-01-21 04:00:26 +00:00
|
|
|
Pattern: artist.Beveled {
|
2023-01-24 05:02:11 +00:00
|
|
|
artist.NewUniform(hex(0xCCD5D2FF)),
|
|
|
|
artist.NewUniform(hex(0x4B5B59FF)),
|
2023-01-17 21:38:57 +00:00
|
|
|
},
|
|
|
|
},
|
2023-01-21 00:07:16 +00:00
|
|
|
artist.Stroke { Pattern: artist.NewUniform(hex(0x8D9894FF)) })
|
2023-01-21 00:24:21 +00:00
|
|
|
var selectedButtonPattern = artist.NewMultiBordered (
|
2023-01-21 00:07:16 +00:00
|
|
|
artist.Stroke { Weight: 1, Pattern: strokePattern },
|
|
|
|
artist.Stroke {
|
2023-01-17 21:38:57 +00:00
|
|
|
Weight: 1,
|
2023-01-21 04:00:26 +00:00
|
|
|
Pattern: artist.Beveled {
|
2023-01-24 05:02:11 +00:00
|
|
|
artist.NewUniform(hex(0xCCD5D2FF)),
|
|
|
|
artist.NewUniform(hex(0x4B5B59FF)),
|
2023-01-17 21:38:57 +00:00
|
|
|
},
|
|
|
|
},
|
2023-01-21 00:07:16 +00:00
|
|
|
artist.Stroke { Weight: 1, Pattern: accentPattern },
|
|
|
|
artist.Stroke { Pattern: artist.NewUniform(hex(0x8D9894FF)) })
|
2023-01-21 00:24:21 +00:00
|
|
|
var pressedButtonPattern = artist.NewMultiBordered (
|
2023-01-21 00:07:16 +00:00
|
|
|
artist.Stroke { Weight: 1, Pattern: strokePattern },
|
|
|
|
artist.Stroke {
|
2023-01-17 21:38:57 +00:00
|
|
|
Weight: 1,
|
2023-01-21 04:00:26 +00:00
|
|
|
Pattern: artist.Beveled {
|
2023-01-24 05:02:11 +00:00
|
|
|
artist.NewUniform(hex(0x4B5B59FF)),
|
|
|
|
artist.NewUniform(hex(0x8D9894FF)),
|
2023-01-17 21:38:57 +00:00
|
|
|
},
|
|
|
|
},
|
2023-01-21 00:07:16 +00:00
|
|
|
artist.Stroke { Pattern: artist.NewUniform(hex(0x8D9894FF)) })
|
2023-01-21 00:24:21 +00:00
|
|
|
var pressedSelectedButtonPattern = artist.NewMultiBordered (
|
2023-01-21 00:07:16 +00:00
|
|
|
artist.Stroke { Weight: 1, Pattern: strokePattern },
|
|
|
|
artist.Stroke {
|
2023-01-17 23:12:04 +00:00
|
|
|
Weight: 1,
|
2023-01-21 04:00:26 +00:00
|
|
|
Pattern: artist.Beveled {
|
2023-01-24 05:02:11 +00:00
|
|
|
artist.NewUniform(hex(0x4B5B59FF)),
|
|
|
|
artist.NewUniform(hex(0x8D9894FF)),
|
2023-01-17 23:12:04 +00:00
|
|
|
},
|
|
|
|
},
|
2023-01-21 00:07:16 +00:00
|
|
|
artist.Stroke { Pattern: artist.NewUniform(hex(0x8D9894FF)) })
|
2023-01-21 00:24:21 +00:00
|
|
|
var disabledButtonPattern = artist.NewMultiBordered (
|
2023-01-21 00:07:16 +00:00
|
|
|
artist.Stroke { Weight: 1, Pattern: weakForegroundPattern },
|
|
|
|
artist.Stroke { Pattern: backgroundPattern })
|
2023-01-17 21:38:57 +00:00
|
|
|
|
|
|
|
func ButtonPattern (enabled, selected, pressed bool) (artist.Pattern) {
|
|
|
|
if enabled {
|
|
|
|
if pressed {
|
2023-01-17 23:12:04 +00:00
|
|
|
if selected {
|
|
|
|
return pressedSelectedButtonPattern
|
|
|
|
} else {
|
|
|
|
return pressedButtonPattern
|
|
|
|
}
|
2023-01-17 21:38:57 +00:00
|
|
|
} else {
|
|
|
|
if selected {
|
|
|
|
return selectedButtonPattern
|
|
|
|
} else {
|
|
|
|
return buttonPattern
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
return disabledButtonPattern
|
|
|
|
}
|
|
|
|
}
|