From ec0cdb8bdcf90a6e5a94aced5c30872177aaf3ab Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 24 Aug 2024 02:11:18 -0400 Subject: [PATCH] tweak background color settings --- tools/lammps-gui/codeeditor.cpp | 3 +++ tools/lammps-gui/lammpsgui.cpp | 1 + 2 files changed, 4 insertions(+) diff --git a/tools/lammps-gui/codeeditor.cpp b/tools/lammps-gui/codeeditor.cpp index fd86b5199e..f5ecdd0b0f 100644 --- a/tools/lammps-gui/codeeditor.cpp +++ b/tools/lammps-gui/codeeditor.cpp @@ -218,7 +218,10 @@ CodeEditor::CodeEditor(QWidget *parent) : help_index.close(); } + setBackgroundRole(QPalette::Light); lineNumberArea = new LineNumberArea(this); + lineNumberArea->setBackgroundRole(QPalette::Dark); + lineNumberArea->setAutoFillBackground(true); connect(this, &CodeEditor::blockCountChanged, this, &CodeEditor::updateLineNumberAreaWidth); connect(this, &CodeEditor::updateRequest, this, &CodeEditor::updateLineNumberArea); updateLineNumberAreaWidth(0); diff --git a/tools/lammps-gui/lammpsgui.cpp b/tools/lammps-gui/lammpsgui.cpp index 8162507d02..d4705645d2 100644 --- a/tools/lammps-gui/lammpsgui.cpp +++ b/tools/lammps-gui/lammpsgui.cpp @@ -90,6 +90,7 @@ LammpsGui::LammpsGui(QWidget *parent, const char *filename) : // use $HOME if we get dropped to "/" like on macOS if (current_dir == "/") current_dir = QDir::homePath(); inspectList.clear(); + setAutoFillBackground(true); // restore and initialize settings QSettings settings;