dabo Commit Revision 1233 Date: 2005-08-31 16:03:39 -0700 (Wed, 31 Aug 2005) Author: paul
Changed: U trunk/dabo/ui/uiwx/dBitmapButton.py
Log: The clipping of the cards in montana seems to be due to the AutoSize of the button picture not accounting for the dead edges of the control. This makes the entire card display in montana, but something with the calculation of the scale needs to change as well, as the cards are now too big for the form.
Diff: Modified: trunk/dabo/ui/uiwx/dBitmapButton.py =================================================================== --- trunk/dabo/ui/uiwx/dBitmapButton.py 2005-08-31 18:02:45 UTC (rev 1232) +++ trunk/dabo/ui/uiwx/dBitmapButton.py 2005-08-31 23:03:39 UTC (rev 1233) @@ -32,7 +32,10 @@ def __sizeToBitmap(self): if self.Picture: bmp = self.Bitmap - self.Size = (bmp.GetWidth(), bmp.GetHeight()) + ## There's a certain border where the image will get clipped on the button, + ## to account for the curved corners. The fudge of 10 looks good on GTK. + fudge = 10 + self.Size = (bmp.GetWidth()+fudge, bmp.GetHeight()+fudge) # Property get/set/del methods follow. Scroll to bottom to see the property
©2005 Paul McNett |