aboutsummaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authorMike Skec <skec@protonmail.ch>2021-01-02 12:54:16 +1100
committerFelix Queißner <felix@ib-queissner.de>2021-01-02 12:41:49 +0100
commit90e20d2c047ae1d9527e15267e62dbc8349e7bb3 (patch)
treedbb5e1da6491c0915f2e928aaca552131f70a46f /src/mainwindow.cpp
parent05df68b1331dbfdf9aff98139a9a1f96f147e651 (diff)
Get rid of unneeded hacky code for fancy url bar
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp17
1 files changed, 1 insertions, 16 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 0649f44..0a818c9 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -21,7 +21,6 @@
MainWindow::MainWindow(QApplication * app, QWidget *parent) :
QMainWindow(parent),
application(app),
- settings_visible(false),
ui(new Ui::MainWindow),
url_status(new ElideLabel(this)),
file_size(new QLabel(this)),
@@ -307,24 +306,12 @@ void MainWindow::on_actionSettings_triggered()
dialog.setGeminiSslTrust(kristall::trust::gemini);
dialog.setHttpsSslTrust(kristall::trust::https);
- // We use this to disable url bar styling
- // while we view Settings dialog, so that the URL bar
- // doesn't look weird after changing theme.
- static const auto update_url_style = [this](bool vis) {
- this->settings_visible = vis;
- if (this->curTab()) this->curTab()->updateUrlBarStyle();
- };
- update_url_style(true);
-
if(dialog.exec() != QDialog::Accepted) {
kristall::setTheme(kristall::options.theme);
this->setUiDensity(kristall::options.ui_density, false);
- update_url_style(false);
return;
}
- update_url_style(false);
-
kristall::trust::gemini = dialog.geminiSslTrust();
kristall::trust::https = dialog.httpsSslTrust();
kristall::options = dialog.options();
@@ -341,9 +328,7 @@ void MainWindow::on_actionSettings_triggered()
// changes are instantly applied.
for (int i = 0; i < this->ui->browser_tabs->count(); ++i)
{
- BrowserTab * tab = this->tabAt(i);
- tab->needs_rerender = true;
- tab->updateUrlBarStyle();
+ this->tabAt(i)->needs_rerender = true;
}
// Re-render the currently-open tab if we have one.
BrowserTab * tab = this->curTab();