diff options
author | 2023-02-28 13:08:30 -0800 | |
---|---|---|
committer | 2023-02-28 13:08:30 -0800 | |
commit | 51296572c0189eaef8081c46270ff48b7e03258d (patch) | |
tree | 067b3a9102f92e4869f2a63d739a49379a9fb481 /wgpu | |
parent | a131f11a23d3430df58bf67a7c89f4b2284822af (diff) | |
parent | 86b85d1436a44e82a9765f9d82b026faf26e22de (diff) | |
download | iced-51296572c0189eaef8081c46270ff48b7e03258d.tar.gz iced-51296572c0189eaef8081c46270ff48b7e03258d.tar.bz2 iced-51296572c0189eaef8081c46270ff48b7e03258d.zip |
Merge remote-tracking branch 'iced-main/master' into feat/multi-window-support
# Conflicts:
# glutin/src/application.rs
# winit/src/icon.rs
Diffstat (limited to '')
-rw-r--r-- | wgpu/src/settings.rs | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/wgpu/src/settings.rs b/wgpu/src/settings.rs index fd3b990a..5ef79499 100644 --- a/wgpu/src/settings.rs +++ b/wgpu/src/settings.rs @@ -1,10 +1,12 @@ //! Configure a renderer. +use std::fmt; + pub use crate::Antialiasing; /// The settings of a [`Backend`]. /// /// [`Backend`]: crate::Backend -#[derive(Debug, Clone, Copy, PartialEq)] +#[derive(Clone, Copy, PartialEq)] pub struct Settings { /// The present mode of the [`Backend`]. /// @@ -36,6 +38,20 @@ pub struct Settings { pub antialiasing: Option<Antialiasing>, } +impl fmt::Debug for Settings { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_struct("Settings") + .field("present_mode", &self.present_mode) + .field("internal_backend", &self.internal_backend) + // 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_some()) + .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. /// |