Skip to content

Commit

Permalink
fix lightmode transition fixes for auto-dark mode
Browse files Browse the repository at this point in the history
  • Loading branch information
dannagle committed Oct 29, 2024
1 parent 864d973 commit 14c8a44
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1390,7 +1390,7 @@ int main(int argc, char *argv[])

QSettings settings(SETTINGSFILE, QSettings::IniFormat);

bool darkMode = settings.value("darkModeCheck", true).toBool();
bool darkMode = Settings::useDark();
PanelGenerator::darkMode = darkMode;
PanelGenerator::renderOnly = panels_only;

Expand Down
2 changes: 1 addition & 1 deletion src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ MainWindow::MainWindow(QWidget *parent) :
setWindowIcon(mIcon);

tableActive = false;
darkMode = settings.value("darkModeCheck", true).toBool();
darkMode = Settings::useDark();

PanelGenerator::darkMode = darkMode;

Expand Down
7 changes: 4 additions & 3 deletions src/persistentconnection.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "persistentconnection.h"
#include "settings.h"
#include "ui_persistentconnection.h"

#include <QTextStream>
Expand Down Expand Up @@ -67,7 +68,7 @@ PersistentConnection::PersistentConnection(QWidget *parent) :
QSettings settings(SETTINGSFILE, QSettings::IniFormat);

translateMacroSend = settings.value("translateMacroSendCheck", true).toBool();
this->darkMode = settings.value("darkModeCheck", true).toBool();
this->darkMode = Settings::useDark();


if(this->darkMode) {
Expand Down Expand Up @@ -205,7 +206,7 @@ void PersistentConnection::init()
bool appendCR = settings.value("appendCRcheck", true).toBool();
ui->appendCRcheck->setChecked(appendCR);

this->darkMode = settings.value("darkModeCheck", true).toBool();
this->darkMode = Settings::useDark();


ui->stopResendingButton->setStyleSheet(PersistentConnection::RESEND_BUTTON_STYLE);
Expand Down Expand Up @@ -256,7 +257,7 @@ void PersistentConnection::initDTLS()
bool appendCR = settings.value("appendCRcheck", true).toBool();
ui->appendCRcheck->setChecked(appendCR);

this->darkMode = settings.value("darkModeCheck", true).toBool();
this->darkMode = Settings::useDark();


ui->stopResendingButton->setStyleSheet(PersistentConnection::RESEND_BUTTON_STYLE);
Expand Down

0 comments on commit 14c8a44

Please sign in to comment.