Use CSDs on Redox, set min size

This commit is contained in:
Jeremy Soller 2024-02-10 19:09:37 -07:00
parent 343f31317f
commit 75874caf9d

View file

@ -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<Option<Vec<PathBuf>>, Box<dyn std::error::Error>> {
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<dyn std::error::Error>> {
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,