Skip to content

Commit

Permalink
Merge pull request #432 from ISISNeutronMuon/correct-gui-dark-mode
Browse files Browse the repository at this point in the history
Remove hardcoded background colour in the GUI dialogs
  • Loading branch information
ChiCheng45 authored May 3, 2024
2 parents 37eac8e + 664fdf4 commit 995c338
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,6 @@ def get_widget_value(self):
value = float(self._fields[index].text())
except ValueError:
value = self._defaults[index]
self._fields[index].setStyleSheet(
"background-color:rgb(180,20,180); font-weight: bold"
)
else:
self._fields[index].setStyleSheet("")
params[key] = value
Expand Down
8 changes: 2 additions & 6 deletions MDANSE_GUI/Src/MDANSE_GUI/PeriodicTableViewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ def setGroupStyleSheet(self):
varbox_stylesheet = (
"QToolButton {background-color:rgb("
+ text_rgb
+ "); font-size: 20pt ; font-weight: bold}"
+ "); font-size: 20pt ; font-weight: bold; font: ; color: rgb(20,0,0)}"
)
self.setStyleSheet(varbox_stylesheet)

Expand Down Expand Up @@ -328,7 +328,7 @@ def __init__(self, *args, **kwargs):

self.fields = fields

stylesheet = "background-color:rgb(180,220,180); font-weight: bold"
stylesheet = "font-weight: bold"
self.setStyleSheet(stylesheet)

@Slot(object)
Expand Down Expand Up @@ -377,10 +377,6 @@ def __init__(self, *args, **kwargs):

self.placeElements()

self.setStyleSheet(
"QLabel {background-color:rgb(250,250,250); qproperty-alignment: AlignCenter}"
)

def placeElements(self):
for key, value in _LAYOUT.items():
element = ElementButton(self, element=key)
Expand Down
6 changes: 1 addition & 5 deletions MDANSE_GUI/Src/MDANSE_GUI/Plotter/models/data_tree_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,11 +478,7 @@ def data(self, index, role):
else:
data_root_item = self.get_data_root_item(node)
variable_info = data_root_item.get_dataset_info(node.path, False)
return (
QtGui.QColor("black")
if variable_info["plottable"]
else QtGui.QColor("red")
)
return None if variable_info["plottable"] else QtGui.QColor("red")

elif role == QtCore.Qt.ItemDataRole.ToolTipRole:
node = index.internalPointer()
Expand Down
3 changes: 0 additions & 3 deletions MDANSE_GUI/Src/MDANSE_GUI/RegistryViewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,6 @@ def __init__(self, *args, **kwargs):
self.doc_panel = QTextEdit(self)
self.glayout.addWidget(self.doc_panel, 3, 2, 1, 1)

self.setStyleSheet(
"QLabel {background-color:rgb(250,250,250); qproperty-alignment: AlignCenter}"
)
self.filter_field.textChanged.connect(self.filterEntries)

self.viewer.clicked.connect(self.updateDocstring)
Expand Down
3 changes: 0 additions & 3 deletions MDANSE_GUI/Src/MDANSE_GUI/SubclassViewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,6 @@ def __init__(self, *args, **kwargs):
self.doc_panel = QTextEdit(self)
self.glayout.addWidget(self.doc_panel, 3, 2, 1, 1)

self.setStyleSheet(
"QLabel {background-color:rgb(250,250,250); qproperty-alignment: AlignCenter}"
)
self.filter_field.textChanged.connect(self.filterEntries)

self.viewer.clicked.connect(self.updateDocstring)
Expand Down

0 comments on commit 995c338

Please sign in to comment.