mirror of
https://github.com/ankitects/anki.git
synced 2025-09-22 07:52:24 -04:00
fix case where tags label is bigger than all fields
This commit is contained in:
parent
af26bfe69f
commit
fcf656c396
1 changed files with 5 additions and 2 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue