-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add build_pattern for iced_layershell
- Loading branch information
1 parent
a08d676
commit a673742
Showing
4 changed files
with
1,125 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
mod application; | ||
mod daemon; | ||
use std::borrow::Cow; | ||
|
||
use iced::{Font, Pixels}; | ||
|
||
use crate::settings::{LayerShellSettings, VirtualKeyboardSettings}; | ||
|
||
/// The renderer of some [`Program`]. | ||
pub trait Renderer: iced_core::text::Renderer + iced_graphics::compositor::Default {} | ||
|
||
impl<T> Renderer for T where T: iced_core::text::Renderer + iced_graphics::compositor::Default {} | ||
|
||
#[derive(Debug, Default)] | ||
pub struct MainSettings { | ||
/// The identifier of the application. | ||
/// | ||
/// If provided, this identifier may be used to identify the application or | ||
/// communicate with it through the windowing system. | ||
pub id: Option<String>, | ||
|
||
/// settings for layer shell | ||
pub layer_settings: LayerShellSettings, | ||
/// The data needed to initialize an [`Application`]. | ||
/// | ||
/// The fonts to load on boot. | ||
pub fonts: Vec<Cow<'static, [u8]>>, | ||
|
||
/// The default [`Font`] to be used. | ||
/// | ||
/// By default, it uses [`Family::SansSerif`](iced::font::Family::SansSerif). | ||
pub default_font: Font, | ||
|
||
/// The text size that will be used by default. | ||
/// | ||
/// The default value is `16.0`. | ||
pub default_text_size: Pixels, | ||
|
||
/// If set to true, the renderer will try to perform antialiasing for some | ||
/// primitives. | ||
/// | ||
/// Enabling it can produce a smoother result in some widgets, like the | ||
/// `Canvas`, at a performance cost. | ||
/// | ||
/// By default, it is disabled. | ||
/// | ||
pub antialiasing: bool, | ||
|
||
pub virtual_keyboard_support: Option<VirtualKeyboardSettings>, | ||
} | ||
pub use application::application; | ||
pub use daemon::daemon; |
Oops, something went wrong.