Replaced the chiseled box with the chiseled pattern
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
@@ -320,7 +320,7 @@ func (element *Container) draw () {
|
||||
|
||||
artist.FillRectangle (
|
||||
element.core,
|
||||
theme.BackgroundImage(),
|
||||
theme.BackgroundPattern(),
|
||||
bounds)
|
||||
|
||||
for _, entry := range element.children {
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -44,14 +44,14 @@ func (element *AnalogClock) SetTime (newTime time.Time) {
|
||||
func (element *AnalogClock) draw () {
|
||||
bounds := element.core.Bounds()
|
||||
|
||||
artist.ChiseledRectangle (
|
||||
artist.FillRectangle (
|
||||
element.core,
|
||||
theme.BackgroundProfile(true),
|
||||
theme.SunkenPattern(),
|
||||
bounds)
|
||||
|
||||
for hour := 0; hour < 12; hour ++ {
|
||||
element.radialLine (
|
||||
theme.ForegroundImage(),
|
||||
theme.ForegroundPattern(true),
|
||||
0.8, 0.9, float64(hour) / 6 * math.Pi)
|
||||
}
|
||||
|
||||
@@ -60,13 +60,13 @@ func (element *AnalogClock) draw () {
|
||||
hour := float64(element.time.Hour()) + minute / 60
|
||||
|
||||
element.radialLine (
|
||||
theme.ForegroundImage(),
|
||||
theme.ForegroundPattern(true),
|
||||
0, 0.5, (hour - 3) / 6 * math.Pi)
|
||||
element.radialLine (
|
||||
theme.ForegroundImage(),
|
||||
theme.ForegroundPattern(true),
|
||||
0, 0.7, (minute - 15) / 30 * math.Pi)
|
||||
element.radialLine (
|
||||
theme.AccentImage(),
|
||||
theme.AccentPattern(),
|
||||
0, 0.7, (second - 15) / 30 * math.Pi)
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ func (element *Mouse) Handle (event tomo.Event) {
|
||||
resizeEvent.Height)
|
||||
artist.FillRectangle (
|
||||
element.core,
|
||||
theme.AccentImage(),
|
||||
theme.AccentPattern(),
|
||||
element.Bounds())
|
||||
artist.StrokeRectangle (
|
||||
element.core,
|
||||
|
||||
Reference in New Issue
Block a user