Add logging to window and context creation
This commit is contained in:
parent
93bfe2c75e
commit
a4477723d4
1 changed files with 13 additions and 1 deletions
|
|
@ -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.
|
||||
///
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue