aboutsummaryrefslogtreecommitdiff
path: root/src/browsertab.cpp
diff options
context:
space:
mode:
authorFelix (xq) Queißner <git@mq32.de>2021-03-17 11:54:43 +0100
committerFelix (xq) Queißner <git@mq32.de>2021-05-08 10:44:03 +0200
commit10684b6d82f1843eff3921da40802d335fb3cf5c (patch)
treea80d403f0668686de90c2cd48786e7b5e5fc2128 /src/browsertab.cpp
parenta2f36ec4d14ddf1bcee98e52a0f3a924804d06fb (diff)
downloadkristall-10684b6d82f1843eff3921da40802d335fb3cf5c.tar.gz
Further improves localization (#191). Allows switching and setting the chosen localization properly.
Diffstat (limited to 'src/browsertab.cpp')
-rw-r--r--src/browsertab.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/browsertab.cpp b/src/browsertab.cpp
index ef6f5e8..fa4ed9a 100644
--- a/src/browsertab.cpp
+++ b/src/browsertab.cpp
@@ -64,6 +64,12 @@ BrowserTab::BrowserTab(MainWindow *mainWindow) : QWidget(nullptr),
{
ui->setupUi(this);
+ connect( // connect with "this" as context, so the connection will die when the window is destroyed
+ kristall::globals().localization.get(), &Localization::translationChanged,
+ this, [this]() { this->ui->retranslateUi(this); },
+ Qt::DirectConnection
+ );
+
this->setUiDensity(kristall::globals().options.ui_density);
addProtocolHandler<GeminiClient>();