mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Refactor 'grey-out' CSS
The CSS used to grey out the checkbox and label for advanced IADS should be refactored so it can be reused for disabling player checkboxes in the flight edit/create dialogs. The solution is applied to all checkboxes/labels, so that there's a consistent way of showing users when a checkbox/label is disabled.
This commit is contained in:
parent
647032ca48
commit
d9c6be0a9d
@ -393,11 +393,8 @@ class TheaterConfiguration(QtWidgets.QWizardPage):
|
||||
mapSettingsLayout.addWidget(QtWidgets.QLabel("Invert Map"), 0, 0)
|
||||
mapSettingsLayout.addWidget(invertMap, 0, 1)
|
||||
self.advanced_iads = QtWidgets.QCheckBox()
|
||||
disabled_grey_out = "QCheckBox::indicator:disabled{ background-color: rgba(255, 255, 255, 5%); }"
|
||||
self.advanced_iads.setStyleSheet(disabled_grey_out)
|
||||
self.registerField("advanced_iads", self.advanced_iads)
|
||||
self.iads_label = QtWidgets.QLabel("Advanced IADS (WIP)")
|
||||
self.iads_label.setStyleSheet("QLabel:disabled{color: #888888}")
|
||||
mapSettingsLayout.addWidget(self.iads_label, 1, 0)
|
||||
mapSettingsLayout.addWidget(self.advanced_iads, 1, 1)
|
||||
mapSettingsGroup.setLayout(mapSettingsLayout)
|
||||
|
||||
@ -231,6 +231,10 @@ QLabel{
|
||||
border: none;
|
||||
}
|
||||
|
||||
QLabel:disabled {
|
||||
color: #888888;
|
||||
}
|
||||
|
||||
QLabel[style="base-title"]{
|
||||
font-size: 24px;
|
||||
}
|
||||
@ -383,6 +387,13 @@ QGroupBox::indicator:checked , QCheckBox::indicator:checked {
|
||||
image: url(resources/stylesheets/check.png);
|
||||
}
|
||||
|
||||
QCheckBox:disabled {
|
||||
color: #888888;
|
||||
}
|
||||
QCheckBox::indicator:disabled {
|
||||
background-color: rgba(255, 255, 255, 5%);
|
||||
}
|
||||
|
||||
|
||||
/*QDialog*/
|
||||
QDialog{
|
||||
|
||||
@ -191,4 +191,15 @@ QWidget[style="baseMenuHeader"]{
|
||||
|
||||
QLabel[style="small"]{
|
||||
font-size: 8px;
|
||||
}
|
||||
|
||||
QCheckBox:disabled {
|
||||
color: #888888;
|
||||
}
|
||||
QCheckBox::indicator:disabled {
|
||||
background-color: rgba(255, 255, 255, 5%);
|
||||
}
|
||||
|
||||
QLabel:disabled {
|
||||
color: #888888;
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user