rename lockUiScale setting to lockUiScaleHotkeys

This commit is contained in:
hemirt 2018-07-07 18:03:02 +02:00
parent bcd2676754
commit f3ade88846
4 changed files with 8 additions and 7 deletions

View file

@ -36,7 +36,7 @@ public:
BoolSetting alternateMessageBackground = {"/appearance/messages/alternateMessageBackground", BoolSetting alternateMessageBackground = {"/appearance/messages/alternateMessageBackground",
false}; false};
IntSetting uiScale = {"/appearance/uiScale", 0}; IntSetting uiScale = {"/appearance/uiScale", 0};
BoolSetting lockUiScale = {"/appearance/lockUiScale", false}; BoolSetting lockUiScaleHotkeys = {"/appearance/lockUiScaleHotkeys", false};
BoolSetting windowTopMost = {"/appearance/windowAlwaysOnTop", false}; BoolSetting windowTopMost = {"/appearance/windowAlwaysOnTop", false};
BoolSetting showTabCloseButton = {"/appearance/showTabCloseButton", true}; BoolSetting showTabCloseButton = {"/appearance/showTabCloseButton", true};
BoolSetting hidePreferencesButton = {"/appearance/hidePreferencesButton", false}; BoolSetting hidePreferencesButton = {"/appearance/hidePreferencesButton", false};

View file

@ -60,7 +60,7 @@ BaseWindow::BaseWindow(QWidget *parent, Flags _flags)
this->updateScale(); this->updateScale();
createWindowShortcut(this, "CTRL+0", [] { createWindowShortcut(this, "CTRL+0", [] {
if (!getSettings()->lockUiScale.getValue()) { if (!getSettings()->lockUiScaleHotkeys.getValue()) {
getSettings()->uiScale.setValue(0); getSettings()->uiScale.setValue(0);
} }
}); });
@ -259,12 +259,12 @@ void BaseWindow::wheelEvent(QWheelEvent *event)
if (event->modifiers() & Qt::ControlModifier) { if (event->modifiers() & Qt::ControlModifier) {
if (event->delta() > 0) { if (event->delta() > 0) {
if (!getSettings()->lockUiScale.getValue()) { if (!getSettings()->lockUiScaleHotkeys.getValue()) {
getSettings()->uiScale.setValue( getSettings()->uiScale.setValue(
WindowManager::clampUiScale(getSettings()->uiScale.getValue() + 1)); WindowManager::clampUiScale(getSettings()->uiScale.getValue() + 1));
} }
} else { } else {
if (!getSettings()->lockUiScale.getValue()) { if (!getSettings()->lockUiScaleHotkeys.getValue()) {
getSettings()->uiScale.setValue( getSettings()->uiScale.setValue(
WindowManager::clampUiScale(getSettings()->uiScale.getValue() - 1)); WindowManager::clampUiScale(getSettings()->uiScale.getValue() - 1));
} }

View file

@ -263,7 +263,7 @@ void Window::addShortcuts()
auto s = new QShortcut(QKeySequence::ZoomIn, this); auto s = new QShortcut(QKeySequence::ZoomIn, this);
s->setContext(Qt::WindowShortcut); s->setContext(Qt::WindowShortcut);
QObject::connect(s, &QShortcut::activated, this, [] { QObject::connect(s, &QShortcut::activated, this, [] {
if (!getSettings()->lockUiScale.getValue()) { if (!getSettings()->lockUiScaleHotkeys.getValue()) {
getSettings()->uiScale.setValue( getSettings()->uiScale.setValue(
WindowManager::clampUiScale(getSettings()->uiScale.getValue() + 1)); WindowManager::clampUiScale(getSettings()->uiScale.getValue() + 1));
} }
@ -275,7 +275,7 @@ void Window::addShortcuts()
auto s = new QShortcut(QKeySequence::ZoomOut, this); auto s = new QShortcut(QKeySequence::ZoomOut, this);
s->setContext(Qt::WindowShortcut); s->setContext(Qt::WindowShortcut);
QObject::connect(s, &QShortcut::activated, this, [] { QObject::connect(s, &QShortcut::activated, this, [] {
if (!getSettings()->lockUiScale.getValue()) { if (!getSettings()->lockUiScaleHotkeys.getValue()) {
getSettings()->uiScale.setValue( getSettings()->uiScale.setValue(
WindowManager::clampUiScale(getSettings()->uiScale.getValue() - 1)); WindowManager::clampUiScale(getSettings()->uiScale.getValue() - 1));
} }

View file

@ -86,7 +86,8 @@ void LookPage::addInterfaceTab(LayoutCreator<QVBoxLayout> layout)
box.append(this->createUiScaleSlider()); 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)); layout.append(this->createCheckBox(WINDOW_TOPMOST, getSettings()->windowTopMost));