From 3d22e2f3843ff4d17a3665d31238c5e51f774eca Mon Sep 17 00:00:00 2001 From: Adasauce Date: Wed, 12 Feb 2020 23:02:13 -0400 Subject: [PATCH] UserSettingsPage: device fingerprint on its own line phone users have an unusable settings page, as the device fingerprint stops the layout from shrinking enough to fit the form toggles into view. the value is on a new line, and the font size slightly reduced. --- src/UserSettingsPage.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/UserSettingsPage.cpp b/src/UserSettingsPage.cpp index a0f37c2..51ccdb6 100644 --- a/src/UserSettingsPage.cpp +++ b/src/UserSettingsPage.cpp @@ -293,7 +293,7 @@ UserSettingsPage::UserSettingsPage(QSharedPointer settings, QWidge QFont monospaceFont; monospaceFont.setFamily("Monospace"); monospaceFont.setStyleHint(QFont::Monospace); - monospaceFont.setPointSizeF(monospaceFont.pointSizeF() * 0.9); + monospaceFont.setPointSizeF(monospaceFont.pointSizeF() * 0.8); auto deviceIdLayout = new QHBoxLayout; deviceIdLayout->setContentsMargins(0, OptionMargin, 0, OptionMargin); @@ -310,6 +310,9 @@ UserSettingsPage::UserSettingsPage(QSharedPointer settings, QWidge auto deviceFingerprintLayout = new QHBoxLayout; deviceFingerprintLayout->setContentsMargins(0, OptionMargin, 0, OptionMargin); + auto deviceFingerprintValueLayout = new QHBoxLayout; + deviceFingerprintValueLayout->setContentsMargins(0, 0, 0, OptionMargin); + auto deviceFingerprintLabel = new QLabel(tr("Device Fingerprint"), this); deviceFingerprintLabel->setFont(font); deviceFingerprintLabel->setMargin(0); @@ -317,7 +320,7 @@ UserSettingsPage::UserSettingsPage(QSharedPointer settings, QWidge deviceFingerprintValue_->setTextInteractionFlags(Qt::TextSelectableByMouse); deviceFingerprintValue_->setFont(monospaceFont); deviceFingerprintLayout->addWidget(deviceFingerprintLabel, 1); - deviceFingerprintLayout->addWidget(deviceFingerprintValue_); + deviceFingerprintValueLayout->addWidget(deviceFingerprintValue_, 0, Qt::AlignRight); auto sessionKeysLayout = new QHBoxLayout; sessionKeysLayout->setContentsMargins(0, OptionMargin, 0, OptionMargin); @@ -336,6 +339,7 @@ UserSettingsPage::UserSettingsPage(QSharedPointer settings, QWidge encryptionLayout_->addLayout(deviceIdLayout); encryptionLayout_->addLayout(deviceFingerprintLayout); + encryptionLayout_->addLayout(deviceFingerprintValueLayout); encryptionLayout_->addWidget(new HorizontalLine{this}); encryptionLayout_->addLayout(sessionKeysLayout);