fix case where tags label is bigger than all fields

This commit is contained in:
Damien Elmes 2009-07-04 00:34:26 +09:00
parent af26bfe69f
commit fcf656c396

View file

@ -409,12 +409,15 @@ class FactEditor(object):
self.loadFields(check)
self.parent.setUpdatesEnabled(True)
self.fieldsScroll.setWidget(self.fieldsFrame)
extra = 0
if sys.platform.startswith("darwin"):
extra = 5
elif sys.platform.startswith("win32"):
extra = 3
self.tagsLabel.setFixedWidth(max(*[l.width() for l in self.labels])
else:
extra = -1
tagsw = self.tagsLabel.sizeHint().width()
self.tagsLabel.setFixedWidth(max(tagsw,
max(*[l.width() for l in self.labels]))
+ extra)
self.parent.setTabOrder(last, self.tags)