Made Single Screen Layout config require relevant layout to be selected

This commit is contained in:
OpenSauce04 2024-06-29 18:04:27 +01:00 committed by OpenSauce
parent fcc90e5a27
commit 58b8b4707c
2 changed files with 15 additions and 1 deletions

View File

@ -27,6 +27,17 @@ ConfigureLayout::ConfigureLayout(QWidget* parent)
currentIndex == (uint)(Settings::LayoutOption::LargeScreen));
});
ui->single_screen_layout_config_group->setEnabled(
(Settings::values.layout_option.GetValue() == Settings::LayoutOption::SingleScreen) ||
(Settings::values.layout_option.GetValue() == Settings::LayoutOption::SeparateWindows));
connect(ui->layout_combobox,
static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
[this](int currentIndex) {
ui->single_screen_layout_config_group->setEnabled(
(currentIndex == (uint)(Settings::LayoutOption::SingleScreen)) ||
(currentIndex == (uint)(Settings::LayoutOption::SeparateWindows)));
});
ui->custom_layout_group->setEnabled(
(Settings::values.layout_option.GetValue() == Settings::LayoutOption::CustomLayout));
connect(ui->layout_combobox,

View File

@ -22,6 +22,9 @@
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QGroupBox" name="layout_group">
<property name="enabled">
<bool>true</bool>
</property>
<property name="title">
<string>Screens</string>
</property>
@ -408,7 +411,7 @@
</widget>
</item>
<item>
<widget class="QGroupBox" name="separate_window_config_group">
<widget class="QGroupBox" name="single_screen_layout_config_group">
<property name="minimumSize">
<size>
<width>0</width>