From c14f3beaeba7ac55c765e037adf26db1e9fa5b69 Mon Sep 17 00:00:00 2001 From: Hugo Teso Date: Wed, 5 Apr 2017 16:29:01 +0200 Subject: [PATCH] Fixed theme restore at start up --- src/widgets/memwidget/memorywidget.cpp | 2 +- src/widgets/sidebar.cpp | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/widgets/memwidget/memorywidget.cpp b/src/widgets/memwidget/memorywidget.cpp index 096cbdfb..b44e53e7 100644 --- a/src/widgets/memwidget/memorywidget.cpp +++ b/src/widgets/memwidget/memorywidget.cpp @@ -1729,7 +1729,7 @@ void MemoryWidget::frameLoadFinished(bool ok) { QSettings settings; if (settings.value("dark").toBool()) { QString js = "r2ui.graph_panel.set_theme('dark');"; - qDebug() << ui->graphWebView->page()->mainFrame()->evaluateJavaScript(js); + ui->graphWebView->page()->mainFrame()->evaluateJavaScript(js); } } } diff --git a/src/widgets/sidebar.cpp b/src/widgets/sidebar.cpp index a2a23712..bec3fdb6 100644 --- a/src/widgets/sidebar.cpp +++ b/src/widgets/sidebar.cpp @@ -19,6 +19,11 @@ SideBar::SideBar(MainWindow *main) : } else { ui->respButton->setChecked(false); } + if (settings.value("dark").toBool()) { + ui->themesButton->setChecked(true); + } else { + ui->themesButton->setChecked(false); + } } SideBar::~SideBar()