diff --git a/src/singletons/Settings.hpp b/src/singletons/Settings.hpp index 242e8a2f8..45690cbe6 100644 --- a/src/singletons/Settings.hpp +++ b/src/singletons/Settings.hpp @@ -36,7 +36,7 @@ public: BoolSetting alternateMessageBackground = {"/appearance/messages/alternateMessageBackground", false}; IntSetting uiScale = {"/appearance/uiScale", 0}; - BoolSetting lockUiScale = {"/appearance/lockUiScale", false}; + BoolSetting lockUiScaleHotkeys = {"/appearance/lockUiScaleHotkeys", false}; BoolSetting windowTopMost = {"/appearance/windowAlwaysOnTop", false}; BoolSetting showTabCloseButton = {"/appearance/showTabCloseButton", true}; BoolSetting hidePreferencesButton = {"/appearance/hidePreferencesButton", false}; diff --git a/src/widgets/BaseWindow.cpp b/src/widgets/BaseWindow.cpp index b8410032c..a55ce419c 100644 --- a/src/widgets/BaseWindow.cpp +++ b/src/widgets/BaseWindow.cpp @@ -60,7 +60,7 @@ BaseWindow::BaseWindow(QWidget *parent, Flags _flags) this->updateScale(); createWindowShortcut(this, "CTRL+0", [] { - if (!getSettings()->lockUiScale.getValue()) { + if (!getSettings()->lockUiScaleHotkeys.getValue()) { getSettings()->uiScale.setValue(0); } }); @@ -259,12 +259,12 @@ void BaseWindow::wheelEvent(QWheelEvent *event) if (event->modifiers() & Qt::ControlModifier) { if (event->delta() > 0) { - if (!getSettings()->lockUiScale.getValue()) { + if (!getSettings()->lockUiScaleHotkeys.getValue()) { getSettings()->uiScale.setValue( WindowManager::clampUiScale(getSettings()->uiScale.getValue() + 1)); } } else { - if (!getSettings()->lockUiScale.getValue()) { + if (!getSettings()->lockUiScaleHotkeys.getValue()) { getSettings()->uiScale.setValue( WindowManager::clampUiScale(getSettings()->uiScale.getValue() - 1)); } diff --git a/src/widgets/Window.cpp b/src/widgets/Window.cpp index ef876524d..648bf6763 100644 --- a/src/widgets/Window.cpp +++ b/src/widgets/Window.cpp @@ -263,7 +263,7 @@ void Window::addShortcuts() auto s = new QShortcut(QKeySequence::ZoomIn, this); s->setContext(Qt::WindowShortcut); QObject::connect(s, &QShortcut::activated, this, [] { - if (!getSettings()->lockUiScale.getValue()) { + if (!getSettings()->lockUiScaleHotkeys.getValue()) { getSettings()->uiScale.setValue( WindowManager::clampUiScale(getSettings()->uiScale.getValue() + 1)); } @@ -275,7 +275,7 @@ void Window::addShortcuts() auto s = new QShortcut(QKeySequence::ZoomOut, this); s->setContext(Qt::WindowShortcut); QObject::connect(s, &QShortcut::activated, this, [] { - if (!getSettings()->lockUiScale.getValue()) { + if (!getSettings()->lockUiScaleHotkeys.getValue()) { getSettings()->uiScale.setValue( WindowManager::clampUiScale(getSettings()->uiScale.getValue() - 1)); } diff --git a/src/widgets/settingspages/LookPage.cpp b/src/widgets/settingspages/LookPage.cpp index e2323ee23..2d572c300 100644 --- a/src/widgets/settingspages/LookPage.cpp +++ b/src/widgets/settingspages/LookPage.cpp @@ -86,7 +86,8 @@ void LookPage::addInterfaceTab(LayoutCreator layout) box.append(this->createUiScaleSlider()); } - layout.append(this->createCheckBox("Lock window scale hotkeys", getSettings()->lockUiScale)); + layout.append( + this->createCheckBox("Lock window scale hotkeys", getSettings()->lockUiScaleHotkeys)); layout.append(this->createCheckBox(WINDOW_TOPMOST, getSettings()->windowTopMost));