Separated out resizing functionality.
This commit is contained in:
parent
5b10f454f7
commit
fc9af02697
|
@ -1,6 +1,9 @@
|
|||
# Module 'Buttons'
|
||||
|
||||
|
||||
from Resize import *
|
||||
|
||||
|
||||
# Import module 'rect' renamed as '_rect'
|
||||
#
|
||||
import rect
|
||||
|
@ -92,12 +95,6 @@ class LabelAppearance():
|
|||
v = (top + bottom - d.lineheight()) / 2
|
||||
self.textpos = h, v
|
||||
#
|
||||
# Resize method.
|
||||
# Override for widgets that take over window geomtry management.
|
||||
#
|
||||
def resize(self):
|
||||
pass
|
||||
#
|
||||
# Generic drawing mechanism.
|
||||
# Do not override redraw() or draw() methods; override drawit() c.s.
|
||||
#
|
||||
|
@ -360,11 +357,12 @@ class RadioReactivity() = TriggerReactivity():
|
|||
|
||||
# Auxiliary class for 'define' method.
|
||||
#
|
||||
class Define():
|
||||
class Define() = NoResize():
|
||||
#
|
||||
def define(self, (win, bounds, text)):
|
||||
self.init_appearance(win, bounds)
|
||||
self.init_reactivity()
|
||||
self.init_resize()
|
||||
self.settext(text)
|
||||
return self
|
||||
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
# Module 'Buttons'
|
||||
|
||||
|
||||
from Resize import *
|
||||
|
||||
|
||||
# Import module 'rect' renamed as '_rect'
|
||||
#
|
||||
import rect
|
||||
|
@ -92,12 +95,6 @@ class LabelAppearance():
|
|||
v = (top + bottom - d.lineheight()) / 2
|
||||
self.textpos = h, v
|
||||
#
|
||||
# Resize method.
|
||||
# Override for widgets that take over window geomtry management.
|
||||
#
|
||||
def resize(self):
|
||||
pass
|
||||
#
|
||||
# Generic drawing mechanism.
|
||||
# Do not override redraw() or draw() methods; override drawit() c.s.
|
||||
#
|
||||
|
@ -360,11 +357,12 @@ class RadioReactivity() = TriggerReactivity():
|
|||
|
||||
# Auxiliary class for 'define' method.
|
||||
#
|
||||
class Define():
|
||||
class Define() = NoResize():
|
||||
#
|
||||
def define(self, (win, bounds, text)):
|
||||
self.init_appearance(win, bounds)
|
||||
self.init_reactivity()
|
||||
self.init_resize()
|
||||
self.settext(text)
|
||||
return self
|
||||
|
||||
|
|
Loading…
Reference in New Issue