wip: Various refactorings and improvements

This commit is contained in:
Michael Aaron Murphy 2022-12-06 16:12:59 +01:00
parent 702ea033af
commit 37f978d1b3
No known key found for this signature in database
GPG key ID: B2732D4240C9212C
33 changed files with 744 additions and 1229 deletions

View file

@ -1,3 +1,6 @@
// Copyright 2022 System76 <info@system76.com>
// SPDX-License-Identifier: MPL-2.0
pub use iced;
pub use iced_lazy;
pub use iced_native;
@ -8,19 +11,15 @@ pub mod font;
pub mod theme;
pub mod widget;
mod ext;
pub use ext::ElementExt;
mod utils;
pub use theme::Theme;
pub type Renderer = iced::Renderer<Theme>;
pub type Element<'a, Message> = iced::Element<'a, Message, Renderer>;
#[derive(Clone, Copy, Debug)]
pub enum WindowMsg {
Close,
Drag,
Minimize,
Maximize,
ToggleSidebar,
}
pub fn settings<Flags: Default>() -> iced::Settings<Flags> {
let mut settings = iced::Settings::default();
settings.default_font = match font::FONT {