Theming tweaks and rendering fixes
This commit is contained in:
@@ -4,6 +4,7 @@ import "image"
|
||||
import "git.tebibyte.media/sashakoshka/tomo/input"
|
||||
import "git.tebibyte.media/sashakoshka/tomo/theme"
|
||||
import "git.tebibyte.media/sashakoshka/tomo/config"
|
||||
import "git.tebibyte.media/sashakoshka/tomo/artist"
|
||||
import "git.tebibyte.media/sashakoshka/tomo/textdraw"
|
||||
import "git.tebibyte.media/sashakoshka/tomo/elements/core"
|
||||
|
||||
@@ -175,7 +176,7 @@ func (element *Checkbox) draw () {
|
||||
backgroundPattern.Draw(element.core, bounds)
|
||||
|
||||
pattern := element.theme.Pattern(theme.PatternButton, state)
|
||||
pattern.Draw(element.core, boxBounds)
|
||||
artist.DrawBounds(element.core, pattern, boxBounds)
|
||||
|
||||
textBounds := element.drawer.LayoutBounds()
|
||||
margin := element.theme.Margin(theme.PatternBackground)
|
||||
|
||||
@@ -67,7 +67,7 @@ func (entry *ListEntry) Draw (
|
||||
On: on,
|
||||
}
|
||||
|
||||
pattern := entry.theme.Pattern (theme.PatternRaised, state)
|
||||
pattern := entry.theme.Pattern(theme.PatternRaised, state)
|
||||
padding := entry.theme.Padding(theme.PatternRaised)
|
||||
bounds := entry.Bounds().Add(offset)
|
||||
artist.DrawBounds(destination, pattern, bounds)
|
||||
|
||||
@@ -118,6 +118,13 @@ func (element *Artist) draw () {
|
||||
Inset: artist.Inset { 8, 8, 8, 8 },
|
||||
}.Draw(c03, c03.Bounds())
|
||||
|
||||
// 1, 3
|
||||
c13 := element.cellAt(1, 3)
|
||||
patterns.Border {
|
||||
Canvas: element.thingy(c42),
|
||||
Inset: artist.Inset { 8, 8, 8, 8 },
|
||||
}.Draw(c13, c13.Bounds().Inset(10))
|
||||
|
||||
// how long did that take to render?
|
||||
drawTime := time.Since(drawStart)
|
||||
textDrawer := textdraw.Drawer { }
|
||||
|
||||
Reference in New Issue
Block a user