1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-12 10:03:53 +02:00

Merge pull request #4822 from mikeiit/fix_launcher_automatic_scaling

Hide launcher interface scaling spin box
This commit is contained in:
Ivan Savenko 2024-10-27 21:18:44 +02:00 committed by GitHub
commit 7132ee560d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -838,9 +838,16 @@ void CSettingsView::on_sliderScalingCursor_valueChanged(int value)
void CSettingsView::on_buttonScalingAuto_toggled(bool checked)
{
ui->spinBoxInterfaceScaling->setDisabled(checked);
ui->spinBoxInterfaceScaling->setValue(100);
if (checked)
{
ui->spinBoxInterfaceScaling->hide();
}
else
{
ui->spinBoxInterfaceScaling->show();
ui->spinBoxInterfaceScaling->setValue(100);
}
Settings node = settings.write["video"]["resolution"]["scaling"];
node->Integer() = checked ? 0 : 100;
}