From ae0fb952920d768dc35a746c6f4334116e3150da Mon Sep 17 00:00:00 2001 From: dec05eba Date: Tue, 31 Dec 2024 21:43:10 +0100 Subject: Better global settings design, dont change startup setting in ui if systemctl command fails --- src/gui/GlobalSettingsPage.cpp | 11 +++++++---- src/gui/RadioButton.cpp | 20 ++++++++++---------- src/gui/SettingsPage.cpp | 7 +++++++ 3 files changed, 24 insertions(+), 14 deletions(-) (limited to 'src/gui') diff --git a/src/gui/GlobalSettingsPage.cpp b/src/gui/GlobalSettingsPage.cpp index ca4c4ea..7c8b902 100644 --- a/src/gui/GlobalSettingsPage.cpp +++ b/src/gui/GlobalSettingsPage.cpp @@ -55,6 +55,7 @@ namespace gsr { get_color_theme().tint_color = mgl::Color(118, 185, 0); else if(id == "intel") get_color_theme().tint_color = mgl::Color(8, 109, 183); + return true; }; list->add_widget(std::move(tint_color_radio_button)); return std::make_unique("Appearance", std::move(list), mgl::vec2f(parent_page->get_inner_size().x, 0.0f)); @@ -62,10 +63,11 @@ namespace gsr { std::unique_ptr GlobalSettingsPage::create_startup_subsection(ScrollablePage *parent_page) { auto list = std::make_unique(List::Orientation::VERTICAL); - auto startup_radio_button = std::make_unique(&get_theme().body_font, RadioButton::Orientation::VERTICAL); + list->add_widget(std::make_unique