Use CSDs on Redox, set min size
This commit is contained in:
parent
343f31317f
commit
75874caf9d
1 changed files with 2 additions and 15 deletions
17
src/lib.rs
17
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<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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue