From 16eec657652411b7bc3fb160f4f03298f1ced19a Mon Sep 17 00:00:00 2001 From: Michael Aaron Murphy Date: Wed, 13 Sep 2023 15:21:58 +0200 Subject: [PATCH] feat(app): add `set_theme` and `set_scaling_factor` to `app::command` --- src/app/command.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/app/command.rs b/src/app/command.rs index 8aa4f9d3..887379c4 100644 --- a/src/app/command.rs +++ b/src/app/command.rs @@ -39,6 +39,14 @@ pub fn minimize() -> iced::Command> { crate::command::minimize().map(Message::Cosmic) } +pub fn set_scaling_factor(factor: f32) -> iced::Command> { + message::cosmic(super::cosmic::Message::ScaleFactor(factor)) +} + +pub fn set_theme(theme: crate::Theme) -> iced::Command> { + message::cosmic(super::cosmic::Message::ThemeChange(theme)) +} + pub fn set_title(title: String) -> iced::Command> { crate::command::set_title(title).map(Message::Cosmic) }