wip: Various refactorings and improvements
This commit is contained in:
parent
702ea033af
commit
37f978d1b3
33 changed files with 744 additions and 1229 deletions
19
src/ext.rs
Normal file
19
src/ext.rs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
// Copyright 2022 System76 <info@system76.com>
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
use iced::Color;
|
||||
|
||||
pub trait ElementExt {
|
||||
#[must_use]
|
||||
fn debug(self, debug: bool) -> Self;
|
||||
}
|
||||
|
||||
impl<'a, Message: 'static> ElementExt for crate::Element<'a, Message> {
|
||||
fn debug(self, debug: bool) -> Self {
|
||||
if debug {
|
||||
self.explain(Color::WHITE)
|
||||
} else {
|
||||
self
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue