diff options
author | 2022-05-11 18:08:36 +0200 | |
---|---|---|
committer | 2022-05-11 18:08:36 +0200 | |
commit | 2e7757a42819fba3757c5b88e77e184b09649910 (patch) | |
tree | 80b0a55ff3834647a6527d8856632e79d8352789 /glow/src/settings.rs | |
parent | d4ed8afa1ed15486144dc7afee52c09e044a92e0 (diff) | |
parent | b440df9afbb2b63717e84d209a0995ada0e72e6d (diff) | |
download | iced-2e7757a42819fba3757c5b88e77e184b09649910.tar.gz iced-2e7757a42819fba3757c5b88e77e184b09649910.tar.bz2 iced-2e7757a42819fba3757c5b88e77e184b09649910.zip |
Merge pull request #1314 from derezzedex/dev/system-information
feat: fetch system information
Diffstat (limited to '')
-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. /// |