diff --git a/dash-frontend/src/tab/settings/tab_look_and_feel.rs b/dash-frontend/src/tab/settings/tab_look_and_feel.rs index 539c0d99..12db4c71 100644 --- a/dash-frontend/src/tab/settings/tab_look_and_feel.rs +++ b/dash-frontend/src/tab/settings/tab_look_and_feel.rs @@ -14,6 +14,7 @@ use wlx_common::{config::GeneralConfig, dash_interface::ConfigChangeKind}; use crate::tab::settings::{ SettingType, SettingsMountParams, SettingsTab, Task, horiz_cell, macros::{MacroParams, options_category, options_checkbox, options_dropdown, options_slider_f32}, + mount_requires_restart, }; pub struct State {} @@ -92,6 +93,8 @@ fn palettes_dropdown(mp: &mut MacroParams, parent: WidgetID) -> anyhow::Result<( ); } + mount_requires_restart(mp.layout, parent)?; + let btn = mp.parser_state.fetch_component_as::(&id)?; btn.on_click(Rc::new({ let parent_tasks = mp.tasks.clone(); diff --git a/wgui/src/components/button.rs b/wgui/src/components/button.rs index a309933f..4f1b9718 100644 --- a/wgui/src/components/button.rs +++ b/wgui/src/components/button.rs @@ -145,7 +145,7 @@ impl ComponentTrait for ComponentButton { for (child, _) in children { if let Some(mut widget) = data.layout.state.widgets.get_as::(child) { - if !state.id_sprite.is_null() { + if !state.id_sprite.is_null() && state.id_sprite != child { log::error!("Button with more than one sprite!"); } // apply initial color from button @@ -158,7 +158,7 @@ impl ComponentTrait for ComponentButton { } state.id_sprite = child; } else if let Some(mut widget) = data.layout.state.widgets.get_as::(child) { - if !state.id_label.is_null() { + if !state.id_label.is_null() && state.id_label != child { log::error!("Button with more than one label!"); } if let Some(on_color) = state.colors.color.on_color() {