diff options
author | Guido van Rossum <guido@python.org> | 1992-12-14 12:57:56 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1992-12-14 12:57:56 (GMT) |
commit | 89a78697b86782a08be54269b9a7f55d4137d184 (patch) | |
tree | c93404611fb1495f466ccd5695b8e80cfab870a1 /Lib/stdwin/Buttons.py | |
parent | a8993cfe16a04c612da72f72181ac63c6f858224 (diff) | |
download | cpython-89a78697b86782a08be54269b9a7f55d4137d184.zip cpython-89a78697b86782a08be54269b9a7f55d4137d184.tar.gz cpython-89a78697b86782a08be54269b9a7f55d4137d184.tar.bz2 |
* Got entirely rid of path.py.
* Many modules: fixes for new, stricter, argument passing rules
(most changes were automatic ones -- not all of this is tested!).
* gwin.py: now uses mainloop.py for its main loop and window admin.
* mainloop.py: always call dispatch() with event as a tuple!
* Fix bug in pdb's 'clear' command -- don't set the bpt but clear it!
Diffstat (limited to 'Lib/stdwin/Buttons.py')
-rwxr-xr-x | Lib/stdwin/Buttons.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/stdwin/Buttons.py b/Lib/stdwin/Buttons.py index d1435d3..9a99707 100755 --- a/Lib/stdwin/Buttons.py +++ b/Lib/stdwin/Buttons.py @@ -35,7 +35,7 @@ class LabelAppearance: # # Size enquiry # - def getminsize(self, (m, (width, height))): + def getminsize(self, m, (width, height)): width = max(width, m.textwidth(self.text) + 6) height = max(height, m.lineheight() + 6) return width, height @@ -108,8 +108,8 @@ class LabelAppearance: d.erase(self.bounds) self.draw(d, self.bounds) # - def draw(self, (d, area)): - area = _rect.intersect(area, self.bounds) + def draw(self, d, area): + area = _rect.intersect([area, self.bounds]) if area == _rect.empty: return d.cliprect(area) @@ -145,7 +145,7 @@ class LabelAppearance: class StrutAppearance(LabelAppearance): # - def getminsize(self, (m, (width, height))): + def getminsize(self, m, (width, height)): height = max(height, m.lineheight() + 6) return width, height # @@ -175,7 +175,7 @@ class ButtonAppearance(LabelAppearance): # class CheckAppearance(LabelAppearance): # - def getminsize(self, (m, (width, height))): + def getminsize(self, m, (width, height)): minwidth = m.textwidth(self.text) + 6 minheight = m.lineheight() + 6 width = max(width, minwidth + minheight + m.textwidth(' ')) @@ -382,7 +382,7 @@ class Define: def destroy(self): self.parent = 0 # - def definetext(self, (parent, text)): + def definetext(self, parent, text): self = self.define(parent) self.settext(text) return self |