From 82bd2ca0d868f209d0e0c5f7c04255523daabe3c Mon Sep 17 00:00:00 2001 From: machinewrapped Date: Sun, 9 Jul 2023 11:26:51 +0200 Subject: [PATCH] Pad labels to give dropdowns space A round-about solution to the problem. --- GUI/Widgets/OptionsWidgets.py | 1 + theme/subtrans.qss | 18 +++++++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/GUI/Widgets/OptionsWidgets.py b/GUI/Widgets/OptionsWidgets.py index 87557473..a801b89d 100644 --- a/GUI/Widgets/OptionsWidgets.py +++ b/GUI/Widgets/OptionsWidgets.py @@ -136,6 +136,7 @@ class DropdownOptionWidget(OptionWidget): def __init__(self, key, values, initial_value, tooltip = None): super(DropdownOptionWidget, self).__init__(key, initial_value, tooltip=tooltip) self.combo_box = QComboBox(self) + self.combo_box.setSizeAdjustPolicy(QComboBox.SizeAdjustPolicy.AdjustToContents) for value in values: self.combo_box.addItem(value) diff --git a/theme/subtrans.qss b/theme/subtrans.qss index 4d283eaa..07442853 100644 --- a/theme/subtrans.qss +++ b/theme/subtrans.qss @@ -5,6 +5,14 @@ QWidget { QLabel { color: black; + padding-top: 2px; + padding-bottom: 6px; +} + +QComboBox { + padding: 1px 18px 1px 3px; + min-width: 6em; + min-height: 1em; } QStatusBar { @@ -12,13 +20,17 @@ QStatusBar { } .MainToolbar, .ProjectToolbar { - background-color: #808080; + background-color: #a0a0a0; border: none; } +QTreeView:item { + border-radius: 12; +} + QTreeView:item:selected { - border: 2px solid #800000; - font-weight: bold; + border: 2px solid black; + border-radius: 12; } .MainWindow {