AnalogClock is no longer flexible.

This commit is contained in:
Sasha Koshka 2023-03-10 13:45:53 -05:00
parent aaa794ac04
commit 5d4a26a877
2 changed files with 1 additions and 10 deletions

View File

@ -84,15 +84,6 @@ func (element *AnalogClock) draw () {
element.radialLine(accent, 0, 0.7, (second - 15) / 30 * math.Pi)
}
// FlexibleHeightFor constrains the clock's minimum size to a 1:1 aspect ratio.
func (element *AnalogClock) FlexibleHeightFor (width int) (height int) {
return width
}
// OnFlexibleHeightChange sets a function to be called when the parameters
// affecting the clock's flexible height change.
func (element *AnalogClock) OnFlexibleHeightChange (func ()) { }
func (element *AnalogClock) radialLine (
source color.RGBA,
inner float64,

View File

@ -14,7 +14,7 @@ func main () {
}
func run () {
window, _ := tomo.NewWindow(2, 2)
window, _ := tomo.NewWindow(200, 216)
window.SetTitle("Clock")
container := basicElements.NewContainer(basicLayouts.Vertical { true, true })
window.Adopt(container)