From f74ab463d44dd0bb025b0cea466d2861576253dd Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Sun, 29 Dec 2019 12:29:47 +0100 Subject: Add `background_color` to `Settings` --- winit/src/settings/mod.rs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'winit/src/settings') 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. -- cgit