From 58b8b4707c8d349a1ffd54aca3cc1fd1ce37340b Mon Sep 17 00:00:00 2001 From: OpenSauce04 Date: Sat, 29 Jun 2024 18:04:27 +0100 Subject: [PATCH] Made Single Screen Layout config require relevant layout to be selected --- src/lime_qt/configuration/configure_layout.cpp | 11 +++++++++++ src/lime_qt/configuration/configure_layout.ui | 5 ++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/lime_qt/configuration/configure_layout.cpp b/src/lime_qt/configuration/configure_layout.cpp index 95c129f3b..e58597376 100644 --- a/src/lime_qt/configuration/configure_layout.cpp +++ b/src/lime_qt/configuration/configure_layout.cpp @@ -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(&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, diff --git a/src/lime_qt/configuration/configure_layout.ui b/src/lime_qt/configuration/configure_layout.ui index 34b30751d..79d530bea 100644 --- a/src/lime_qt/configuration/configure_layout.ui +++ b/src/lime_qt/configuration/configure_layout.ui @@ -22,6 +22,9 @@ + + true + Screens @@ -408,7 +411,7 @@ - + 0