diff options
author | 2022-01-27 06:02:19 -0300 | |
---|---|---|
committer | 2022-05-02 16:03:08 -0300 | |
commit | a4477723d44c35effc8f4bb0ff0cfce93fdf4695 (patch) | |
tree | 08482288420d3a3032ba51196edb72bd08a63227 /glow/src | |
parent | 93bfe2c75ec97ef78f993926c703f040dde4a5f3 (diff) | |
download | iced-a4477723d44c35effc8f4bb0ff0cfce93fdf4695.tar.gz iced-a4477723d44c35effc8f4bb0ff0cfce93fdf4695.tar.bz2 iced-a4477723d44c35effc8f4bb0ff0cfce93fdf4695.zip |
Add logging to window and context creation
Diffstat (limited to 'glow/src')
-rw-r--r-- | glow/src/settings.rs | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/glow/src/settings.rs b/glow/src/settings.rs index f3dddfaf..3691747b 100644 --- a/glow/src/settings.rs +++ b/glow/src/settings.rs @@ -4,7 +4,7 @@ pub use iced_graphics::Antialiasing; /// The settings of a [`Backend`]. /// /// [`Backend`]: crate::Backend -#[derive(Debug, Clone, Copy, PartialEq, Eq)] +#[derive(Clone, Copy, PartialEq, Eq)] pub struct Settings { /// The bytes of the font that will be used by default. /// @@ -39,6 +39,18 @@ impl Default for Settings { } } +impl std::fmt::Debug for Settings { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_struct("Settings") + // Instead of printing the font bytes, we simply show a `bool` indicating if using a default font or not. + .field("default_font", &self.default_font.is_none()) + .field("default_text_size", &self.default_text_size) + .field("text_multithreading", &self.text_multithreading) + .field("antialiasing", &self.antialiasing) + .finish() + } +} + impl Settings { /// Creates new [`Settings`] using environment configuration. /// |