summaryrefslogtreecommitdiffstats
path: root/winit/src/settings
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2019-12-29 12:29:47 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2019-12-29 12:29:47 +0100
commitf74ab463d44dd0bb025b0cea466d2861576253dd (patch)
treeaa500cbe6577a6084e08f3409e406c4a7e7385e4 /winit/src/settings
parentc7b170da6d180f80e539910cccb543720fa3713c (diff)
downloadiced-f74ab463d44dd0bb025b0cea466d2861576253dd.tar.gz
iced-f74ab463d44dd0bb025b0cea466d2861576253dd.tar.bz2
iced-f74ab463d44dd0bb025b0cea466d2861576253dd.zip
Add `background_color` to `Settings`
Diffstat (limited to 'winit/src/settings')
-rw-r--r--winit/src/settings/mod.rs15
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.