theme: add transparency knob for material fill
This commit is contained in:
@@ -104,6 +104,12 @@ pub const PIXEL_AVATAR_LIGHT_LIFT: f32 = 1.6;
|
||||
pub const PIXEL_AVATAR_LIGHT_CAP: f32 = 0.95;
|
||||
pub const PIXEL_AVATAR_DARK_FACTOR: f32 = 0.45;
|
||||
pub const PIXEL_AVATAR_DARK_FLOOR: f32 = 0.18;
|
||||
/// The default window material transparency, as a percent (0 opaque, 100 the lightest fill).
|
||||
pub const DEFAULT_TRANSPARENCY: u8 = 94;
|
||||
/// The light-mode floor of the material fill.
|
||||
pub const MIN_MATERIAL_FILL_LIGHT: f32 = 0.45;
|
||||
/// The dark-mode floor of the material fill.
|
||||
pub const MIN_MATERIAL_FILL_DARK: f32 = 0.15;
|
||||
|
||||
/// Light or dark, resolved from the system appearance.
|
||||
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, serde::Deserialize)]
|
||||
@@ -664,6 +670,10 @@ pub struct CustomTheme {
|
||||
pub popover_elevation: Option<Elevation>,
|
||||
pub dialog_elevation: Option<Elevation>,
|
||||
pub control_elevation: Option<Elevation>,
|
||||
/// Window material transparency as a percent (0 opaque, 100 pure blur).
|
||||
///
|
||||
/// Note: windows platform is not supported
|
||||
pub transparency: Option<u8>,
|
||||
}
|
||||
|
||||
/// The engine's knobs and its platform source.
|
||||
|
||||
Reference in New Issue
Block a user