diff options
Diffstat (limited to 'winit/src/settings')
-rw-r--r-- | winit/src/settings/mod.rs | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/winit/src/settings/mod.rs b/winit/src/settings/mod.rs index 58e3d879..1f9f1502 100644 --- a/winit/src/settings/mod.rs +++ b/winit/src/settings/mod.rs @@ -1,4 +1,5 @@ //! Configure your application. +use crate::Color; #[cfg(target_os = "windows")] #[path = "windows.rs"] @@ -10,12 +11,24 @@ mod platform; pub use platform::PlatformSpecific; /// The settings of an application. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)] +#[derive(Debug, Clone, Copy, PartialEq)] pub struct Settings { /// The [`Window`] settings /// /// [`Window`]: struct.Window.html pub window: Window, + + /// The default background color of the application + pub background_color: Color, +} + +impl Default for Settings { + fn default() -> Settings { + Settings { + window: Window::default(), + background_color: Color::WHITE, + } + } } /// The window settings of an application. |