tweak background color settings

This commit is contained in:
Axel Kohlmeyer
2024-08-24 02:11:18 -04:00
parent c0770715dd
commit ec0cdb8bdc
2 changed files with 4 additions and 0 deletions

View File

@ -218,7 +218,10 @@ CodeEditor::CodeEditor(QWidget *parent) :
help_index.close(); help_index.close();
} }
setBackgroundRole(QPalette::Light);
lineNumberArea = new LineNumberArea(this); lineNumberArea = new LineNumberArea(this);
lineNumberArea->setBackgroundRole(QPalette::Dark);
lineNumberArea->setAutoFillBackground(true);
connect(this, &CodeEditor::blockCountChanged, this, &CodeEditor::updateLineNumberAreaWidth); connect(this, &CodeEditor::blockCountChanged, this, &CodeEditor::updateLineNumberAreaWidth);
connect(this, &CodeEditor::updateRequest, this, &CodeEditor::updateLineNumberArea); connect(this, &CodeEditor::updateRequest, this, &CodeEditor::updateLineNumberArea);
updateLineNumberAreaWidth(0); updateLineNumberAreaWidth(0);

View File

@ -90,6 +90,7 @@ LammpsGui::LammpsGui(QWidget *parent, const char *filename) :
// use $HOME if we get dropped to "/" like on macOS // use $HOME if we get dropped to "/" like on macOS
if (current_dir == "/") current_dir = QDir::homePath(); if (current_dir == "/") current_dir = QDir::homePath();
inspectList.clear(); inspectList.clear();
setAutoFillBackground(true);
// restore and initialize settings // restore and initialize settings
QSettings settings; QSettings settings;