Skip to content

Commit

Permalink
add default minimum size to WindowConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
colinfruit committed Nov 28, 2020
1 parent 8b0e5c9 commit ab79658
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion druid/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ use crate::{AppDelegate, Data, Env, LocalizedString, MenuDesc, Widget};

use druid_shell::WindowState;

const WINDOW_MIN_SIZE: Size = Size::new(400., 400.);

/// A function that modifies the initial environment.
type EnvSetupFn<T> = dyn FnOnce(&mut Env, &T);

Expand Down Expand Up @@ -187,7 +189,7 @@ impl Default for WindowConfig {
fn default() -> Self {
WindowConfig {
size: None,
min_size: None,
min_size: Some(WINDOW_MIN_SIZE),
position: None,
resizable: None,
show_titlebar: None,
Expand Down

0 comments on commit ab79658

Please sign in to comment.