Improved settings layout and deleted old file settings and behavior settings classes.
This commit is contained in:
parent
2b239e57f0
commit
829dc05c49
4 changed files with 13 additions and 48 deletions
|
@ -9,7 +9,7 @@ class SubCategory(QGroupBox):
|
|||
description_font = QFont()
|
||||
description_font.setPointSize(8)
|
||||
|
||||
def __init__(self, title: str, description: str, parent=None):
|
||||
def __init__(self, title: str, description: str=None, parent=None):
|
||||
super().__init__(title, parent)
|
||||
|
||||
self.setSizePolicy(QSizePolicy.Policy.Preferred, QSizePolicy.Policy.Fixed)
|
||||
|
@ -20,14 +20,15 @@ class SubCategory(QGroupBox):
|
|||
self.layout = QFormLayout()
|
||||
self.setLayout(self.layout)
|
||||
|
||||
self.description = QLabel(description + "\n", self)
|
||||
self.layout.addRow(self.description)
|
||||
if description is not None:
|
||||
self.description = QLabel(description + "\n", self)
|
||||
self.layout.addRow(self.description)
|
||||
|
||||
def add_setting(self, text: str, setting, description: str=None):
|
||||
self.layout.addRow(text, setting)
|
||||
|
||||
if description is not None:
|
||||
description_label = QLabel(" " + description)
|
||||
description_label = QLabel(" " + description.replace("\n", "\n "))
|
||||
description_label.setFont(self.description_font)
|
||||
self.layout.addRow(description_label)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue