Replaced the chiseled box with the chiseled pattern

This commit is contained in:
2023-01-14 21:01:00 -05:00
parent 9540812a04
commit e83dde2d21
8 changed files with 115 additions and 284 deletions

View File

@@ -150,12 +150,12 @@ func (element *Button) SetText (text string) {
func (element *Button) draw () {
bounds := element.core.Bounds()
artist.ChiseledRectangle (
artist.FillRectangle (
element.core,
theme.RaisedProfile (
element.pressed,
theme.ButtonPattern (
element.enabled,
element.Selected()),
element.Selected(),
element.pressed),
bounds)
innerBounds := bounds
@@ -179,10 +179,6 @@ func (element *Button) draw () {
offset = offset.Add(theme.SinkOffsetVector())
}
foreground := theme.ForegroundImage()
if !element.enabled {
foreground = theme.DisabledForegroundImage()
}
foreground := theme.ForegroundPattern(element.enabled)
element.drawer.Draw(element.core, foreground, offset)
}

View File

@@ -320,7 +320,7 @@ func (element *Container) draw () {
artist.FillRectangle (
element.core,
theme.BackgroundImage(),
theme.BackgroundPattern(),
bounds)
for _, entry := range element.children {

View File

@@ -95,12 +95,12 @@ func (element *Label) draw () {
artist.FillRectangle (
element.core,
theme.BackgroundImage(),
theme.BackgroundPattern(),
bounds)
textBounds := element.drawer.LayoutBounds()
foreground := theme.ForegroundImage()
foreground := theme.ForegroundPattern(true)
element.drawer.Draw (element.core, foreground, image.Point {
X: 0 - textBounds.Min.X,
Y: 0 - textBounds.Min.Y,