Skip to content

Commit

Permalink
Fix alignment/padding for taxon rank dropdowns
Browse files Browse the repository at this point in the history
  • Loading branch information
JWCook committed Nov 1, 2022
1 parent 51b3dcf commit f936dff
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion naturtag/controllers/taxon_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,9 @@ def __init__(self, label: str, icon_str: str, all_ranks: bool = False):

ranks = RANKS if all_ranks else COMMON_RANKS
self.dropdown = QComboBox()
self.dropdown.addItems([''] + ranks[::-1])
# Workaround for miscalculated padding in pyqtdarktheme
# (which appears to a add a check icon to the left, but doesn't account for its width)
self.dropdown.addItems([''] + [f'{r} ' for r in ranks[::-1]])
self.addWidget(self.dropdown)

def reset(self):
Expand Down

0 comments on commit f936dff

Please sign in to comment.