Mercurial > lcfOS
diff python/diagramitems.py @ 99:6efbeb903777
movage
author | windel |
---|---|
date | Mon, 24 Dec 2012 15:03:30 +0100 |
parents | 4a37d6992bd3 |
children |
line wrap: on
line diff
--- a/python/diagramitems.py Mon Dec 24 13:57:00 2012 +0100 +++ b/python/diagramitems.py Mon Dec 24 15:03:30 2012 +0100 @@ -320,8 +320,10 @@ p = QPointF(size.width(), size.height()) self.setPos(center - p / 2) def changeSize(self, w, h): - h = 20 if h < 20 else h - w = 40 if w < 40 else w + minw = 150 + minh = 50 + h = minh if h < minh else h + w = minw if w < minw else w self.setRect(0.0, 0.0, w, h) rect = self.label.boundingRect() self.label.setPos((w - rect.width()) / 2, (h - rect.height()) / 2)