mirror of
https://github.com/SELinuxProject/setools
synced 2025-03-11 07:18:15 +00:00
apol: Use stylesheet to create a border around all QGroupBoxes.
Apply stylesheet in SEToolsWidget so all widgets will have the sheet and it will propagate to child widgets. This will add more visual grouping to related options. Adjust BooleanQueryTab so the "Default State" group box title is completely shown.
This commit is contained in:
parent
ce821b850f
commit
2ec9336009
@ -222,6 +222,12 @@
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QGroupBox" name="default_criteria">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>120</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Default State</string>
|
||||
</property>
|
||||
|
@ -22,6 +22,21 @@ from errno import ENOENT
|
||||
from PyQt5.uic import loadUi
|
||||
|
||||
|
||||
# Stylesheet that adds a frame around QGroupBoxes
|
||||
stylesheet = "\
|
||||
QGroupBox {\
|
||||
border: 1px solid lightgrey;\
|
||||
margin-top: 0.5em;\
|
||||
}\
|
||||
\
|
||||
QGroupBox::title {\
|
||||
subcontrol-origin: margin;\
|
||||
left: 10px;\
|
||||
padding: 0 3px 0 3px;\
|
||||
}\
|
||||
"
|
||||
|
||||
|
||||
class SEToolsWidget(object):
|
||||
def load_ui(self, filename):
|
||||
# If we are in the git repo, look at the local
|
||||
@ -35,3 +50,5 @@ class SEToolsWidget(object):
|
||||
raise
|
||||
else:
|
||||
raise RuntimeError("Unable to load Qt UI file \"{0}\"".format(filename))
|
||||
|
||||
self.setStyleSheet(stylesheet)
|
||||
|
Loading…
Reference in New Issue
Block a user