Skip to content

Commit

Permalink
Settings: disable UI scale slider if 'auto'
Browse files Browse the repository at this point in the history
  • Loading branch information
rodlie committed Oct 3, 2024
1 parent 5afbbfb commit e28ce41
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/app/GUI/Settings/generalsettingswidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ GeneralSettingsWidget::GeneralSettingsWidget(QWidget *parent)
mDefaultInterfaceScaling = new QCheckBox(this);
mDefaultInterfaceScaling->setText(tr("Auto"));
mDefaultInterfaceScaling->setToolTip(tr("Use scaling reported by the system."));
connect(mDefaultInterfaceScaling, &QCheckBox::stateChanged,
this, [this]() {
mInterfaceScaling->setEnabled(!mDefaultInterfaceScaling->isChecked());
});

mScaleContainerLayout->addWidget(mDefaultInterfaceScaling);

Expand Down Expand Up @@ -201,6 +205,7 @@ void GeneralSettingsWidget::updateSettings(bool restore)
mAutoSaveTimer->setValue((ms / 1000) / 60);

mDefaultInterfaceScaling->setChecked(mSett.fDefaultInterfaceScaling);
mInterfaceScaling->setEnabled(!mDefaultInterfaceScaling->isChecked());
mInterfaceScaling->setValue(mDefaultInterfaceScaling->isChecked() ? 100 : 100 * mSett.fInterfaceScaling);

mToolBarActionNew->setChecked(mSett.fToolBarActionNew);
Expand Down
4 changes: 4 additions & 0 deletions src/app/friction.qss
Original file line number Diff line number Diff line change
Expand Up @@ -572,3 +572,7 @@ QFrame#PopWidget {
border-radius: 2%;
background-color: %5;
}

QSlider::handle:horizontal:disabled {
background: transparent;
}

0 comments on commit e28ce41

Please sign in to comment.