summaryrefslogtreecommitdiffstats
path: root/glow/src/settings.rs
diff options
context:
space:
mode:
Diffstat (limited to 'glow/src/settings.rs')
-rw-r--r--glow/src/settings.rs14
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.
///