diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib.rs | 2 | ||||
-rw-r--r-- | src/native.rs | 18 | ||||
-rw-r--r-- | src/settings.rs | 18 |
3 files changed, 19 insertions, 19 deletions
@@ -174,7 +174,7 @@ //! [documentation]: https://docs.rs/iced //! [examples]: https://github.com/hecrj/iced/tree/master/examples //! [`Application`]: trait.Application.html -#![deny(missing_docs)] +//#![deny(missing_docs)] #![deny(missing_debug_implementations)] #![deny(unused_results)] #![deny(unsafe_code)] diff --git a/src/native.rs b/src/native.rs index cf48a391..d5c9349a 100644 --- a/src/native.rs +++ b/src/native.rs @@ -22,23 +22,7 @@ pub mod widget { //! //! [`TextInput`]: text_input/struct.TextInput.html //! [`text_input::State`]: text_input/struct.State.html - pub mod button { - //! Allow your users to perform actions by pressing a button. - //! - //! A [`Button`] has some local [`State`]. - //! - //! [`Button`]: type.Button.html - //! [`State`]: struct.State.html - - /// A widget that produces a message when clicked. - /// - /// This is an alias of an `iced_native` button with a default - /// `Renderer`. - pub type Button<'a, Message> = - iced_winit::Button<'a, Message, iced_wgpu::Renderer>; - - pub use iced_winit::button::State; - } + pub use iced_wgpu::button; pub mod scrollable { //! Navigate an endless amount of content with a scrollbar. diff --git a/src/settings.rs b/src/settings.rs index 62a1a614..4ae18a14 100644 --- a/src/settings.rs +++ b/src/settings.rs @@ -1,7 +1,8 @@ //! Configure your application. +use crate::Color; /// The settings of an application. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)] +#[derive(Debug, Clone, Copy, PartialEq)] pub struct Settings { /// The [`Window`] settings. /// @@ -9,6 +10,20 @@ pub struct Settings { /// /// [`Window`]: struct.Window.html pub window: Window, + + /// The default background [`Color`] of the application + /// + /// [`Color`]: ../struct.Color.html + pub background: Color, +} + +impl Default for Settings { + fn default() -> Settings { + Settings { + window: Window::default(), + background: Color::WHITE, + } + } } /// The window settings of an application. @@ -44,6 +59,7 @@ impl From<Settings> for iced_winit::Settings { decorations: settings.window.decorations, platform_specific: Default::default(), }, + background: settings.background, } } } |