From 75874caf9daad904b1823b8066d4a89c7c03e31a Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Sat, 10 Feb 2024 19:09:37 -0700 Subject: [PATCH] Use CSDs on Redox, set min size --- src/lib.rs | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 523318e..37da796 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -4,6 +4,7 @@ use cosmic::{ app::{Application, Settings}, cosmic_config::{self, CosmicConfigEntry}, + iced::Limits, }; use std::{ path::PathBuf, @@ -40,12 +41,6 @@ pub fn dialog() -> Result>, Box> { let mut settings = Settings::default(); - #[cfg(target_os = "redox")] - { - // Redox does not support resize if doing CSDs - settings = settings.client_decorations(false); - } - let mut result_lock = Arc::new(Mutex::new(None)); let flags = dialog::Flags { @@ -94,15 +89,7 @@ pub fn main() -> Result<(), Box> { let mut settings = Settings::default(); settings = settings.theme(config.app_theme.theme()); - - #[cfg(target_os = "redox")] - { - // Redox does not support resize if doing CSDs - settings = settings.client_decorations(false); - } - - //TODO: allow size limits on iced_winit - //settings = settings.size_limits(Limits::NONE.min_width(400.0).min_height(200.0)); + settings = settings.size_limits(Limits::NONE.min_width(360.0).min_height(180.0)); let flags = Flags { config_handler,