AnalogClock is no longer flexible.
This commit is contained in:
		
							parent
							
								
									aaa794ac04
								
							
						
					
					
						commit
						5d4a26a877
					
				@ -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,
 | 
			
		||||
 | 
			
		||||
@ -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)
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user