pub enum AppIconPreference {
Dynamic,
Light,
Dark,
Clear,
Tinted,
Unknown,
}Expand description
Selected application-icon artwork, shared by the desktop Dock/bundle icon
picker and the CLI terminal tab icon (ui.app_icon).
Dynamic (default) follows the active light/dark mode, while
Light/Dark/Clear/Tinted pin one artwork. Unknown is the serde
catch-all for values added by future versions and behaves like Dynamic.
Variants§
Dynamic
Follow the active light/dark mode (default).
Light
Always use the light-mode artwork.
Dark
Always use the dark-mode artwork.
Clear
Always use the clear (transparent glass V) artwork.
Tinted
Always use the tinted (monochrome slate) artwork.
Unknown
Catch-all for unknown values added by future versions.
Implementations§
Source§impl AppIconPreference
impl AppIconPreference
Sourcepub fn from_id(id: Option<&str>) -> Self
pub fn from_id(id: Option<&str>) -> Self
Parse a persisted id; missing or unknown values fall back to Dynamic.
Sourcepub const fn resolve(self, dark_mode: bool) -> Self
pub const fn resolve(self, dark_mode: bool) -> Self
Resolve to the concrete pinned artwork: Dynamic/Unknown follow the
given UI mode, while explicit variants pin their own art.
Sourcepub const fn is_dark(self, dark_mode: bool) -> bool
pub const fn is_dark(self, dark_mode: bool) -> bool
Whether the dark-mode artwork applies under the given UI mode.
Only meaningful for the light/dark/dynamic family: Clear and
Tinted pin their own non-flat artwork, so this is always false for
them. Prefer Self::resolve when selecting artwork bytes.
Trait Implementations§
Source§impl Clone for AppIconPreference
impl Clone for AppIconPreference
impl Copy for AppIconPreference
Source§impl Debug for AppIconPreference
impl Debug for AppIconPreference
Source§impl Default for AppIconPreference
impl Default for AppIconPreference
Source§impl<'de> Deserialize<'de> for AppIconPreference
impl<'de> Deserialize<'de> for AppIconPreference
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for AppIconPreference
Source§impl JsonSchema for AppIconPreference
impl JsonSchema for AppIconPreference
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for AppIconPreference
impl PartialEq for AppIconPreference
Source§impl Serialize for AppIconPreference
impl Serialize for AppIconPreference
impl StructuralPartialEq for AppIconPreference
Auto Trait Implementations§
impl Freeze for AppIconPreference
impl RefUnwindSafe for AppIconPreference
impl Send for AppIconPreference
impl Sync for AppIconPreference
impl Unpin for AppIconPreference
impl UnsafeUnpin for AppIconPreference
impl UnwindSafe for AppIconPreference
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.