61 lines
No EOL
22 KiB
HTML
61 lines
No EOL
22 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `CosmicTheme` type in crate `cosmic`."><title>CosmicTheme in cosmic::theme - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-aa0817cf.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="cosmic" data-themes="" data-resource-suffix="" data-rustdoc-version="1.90.0-nightly (3048886e5 2025-07-30)" data-channel="nightly" data-search-js="search-fa3e91e5.js" data-settings-js="settings-5514c975.js" ><script src="../../static.files/storage-68b7e25d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-eebb9057.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-32bb7600.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc type"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../cosmic/index.html">cosmic</a><span class="version">1.0.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Cosmic<wbr>Theme</a></h2><h3><a href="#aliased-type">Aliased Type</a></h3><h3><a href="#fields">Fields</a></h3><ul class="block field"><li><a href="#structfield.accent" title="accent">accent</a></li><li><a href="#structfield.accent_button" title="accent_button">accent_button</a></li><li><a href="#structfield.accent_text" title="accent_text">accent_text</a></li><li><a href="#structfield.active_hint" title="active_hint">active_hint</a></li><li><a href="#structfield.background" title="background">background</a></li><li><a href="#structfield.button" title="button">button</a></li><li><a href="#structfield.control_tint" title="control_tint">control_tint</a></li><li><a href="#structfield.corner_radii" title="corner_radii">corner_radii</a></li><li><a href="#structfield.destructive" title="destructive">destructive</a></li><li><a href="#structfield.destructive_button" title="destructive_button">destructive_button</a></li><li><a href="#structfield.gaps" title="gaps">gaps</a></li><li><a href="#structfield.icon_button" title="icon_button">icon_button</a></li><li><a href="#structfield.is_dark" title="is_dark">is_dark</a></li><li><a href="#structfield.is_frosted" title="is_frosted">is_frosted</a></li><li><a href="#structfield.is_high_contrast" title="is_high_contrast">is_high_contrast</a></li><li><a href="#structfield.link_button" title="link_button">link_button</a></li><li><a href="#structfield.name" title="name">name</a></li><li><a href="#structfield.palette" title="palette">palette</a></li><li><a href="#structfield.primary" title="primary">primary</a></li><li><a href="#structfield.secondary" title="secondary">secondary</a></li><li><a href="#structfield.shade" title="shade">shade</a></li><li><a href="#structfield.spacing" title="spacing">spacing</a></li><li><a href="#structfield.success" title="success">success</a></li><li><a href="#structfield.success_button" title="success_button">success_button</a></li><li><a href="#structfield.text_button" title="text_button">text_button</a></li><li><a href="#structfield.text_tint" title="text_tint">text_tint</a></li><li><a href="#structfield.warning" title="warning">warning</a></li><li><a href="#structfield.warning_button" title="warning_button">warning_button</a></li><li><a href="#structfield.window_hint" title="window_hint">window_hint</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In cosmic::<wbr>theme</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">cosmic</a>::<wbr><a href="index.html">theme</a></div><h1>Type Alias <span class="type">CosmicTheme</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/cosmic/theme/mod.rs.html#23">Source</a> </span></div><pre class="rust item-decl"><code>pub type CosmicTheme = <a class="struct" href="../cosmic_theme/struct.Theme.html" title="struct cosmic::cosmic_theme::Theme">Theme</a>;</code></pre><h2 id="aliased-type" class="section-header">Aliased Type<a href="#aliased-type" class="anchor">§</a></h2><pre class="rust item-decl"><code>pub struct CosmicTheme {<details class="toggle type-contents-toggle"><summary class="hideme"><span>Show 29 fields</span></summary>
|
|
pub name: <a class="struct" href="../cctk/sctk/reexports/client/backend/smallvec/alloc/string/struct.String.html" title="struct cosmic::cctk::sctk::reexports::client::backend::smallvec::alloc::string::String">String</a>,
|
|
pub background: <a class="struct" href="../cosmic_theme/struct.Container.html" title="struct cosmic::cosmic_theme::Container">Container</a>,
|
|
pub primary: <a class="struct" href="../cosmic_theme/struct.Container.html" title="struct cosmic::cosmic_theme::Container">Container</a>,
|
|
pub secondary: <a class="struct" href="../cosmic_theme/struct.Container.html" title="struct cosmic::cosmic_theme::Container">Container</a>,
|
|
pub accent: <a class="struct" href="../cosmic_theme/struct.Component.html" title="struct cosmic::cosmic_theme::Component">Component</a>,
|
|
pub success: <a class="struct" href="../cosmic_theme/struct.Component.html" title="struct cosmic::cosmic_theme::Component">Component</a>,
|
|
pub destructive: <a class="struct" href="../cosmic_theme/struct.Component.html" title="struct cosmic::cosmic_theme::Component">Component</a>,
|
|
pub warning: <a class="struct" href="../cosmic_theme/struct.Component.html" title="struct cosmic::cosmic_theme::Component">Component</a>,
|
|
pub accent_button: <a class="struct" href="../cosmic_theme/struct.Component.html" title="struct cosmic::cosmic_theme::Component">Component</a>,
|
|
pub success_button: <a class="struct" href="../cosmic_theme/struct.Component.html" title="struct cosmic::cosmic_theme::Component">Component</a>,
|
|
pub destructive_button: <a class="struct" href="../cosmic_theme/struct.Component.html" title="struct cosmic::cosmic_theme::Component">Component</a>,
|
|
pub warning_button: <a class="struct" href="../cosmic_theme/struct.Component.html" title="struct cosmic::cosmic_theme::Component">Component</a>,
|
|
pub icon_button: <a class="struct" href="../cosmic_theme/struct.Component.html" title="struct cosmic::cosmic_theme::Component">Component</a>,
|
|
pub link_button: <a class="struct" href="../cosmic_theme/struct.Component.html" title="struct cosmic::cosmic_theme::Component">Component</a>,
|
|
pub text_button: <a class="struct" href="../cosmic_theme/struct.Component.html" title="struct cosmic::cosmic_theme::Component">Component</a>,
|
|
pub button: <a class="struct" href="../cosmic_theme/struct.Component.html" title="struct cosmic::cosmic_theme::Component">Component</a>,
|
|
pub palette: <a class="struct" href="../cosmic_theme/struct.CosmicPaletteInner.html" title="struct cosmic::cosmic_theme::CosmicPaletteInner">CosmicPaletteInner</a>,
|
|
pub spacing: <a class="struct" href="../cosmic_theme/struct.Spacing.html" title="struct cosmic::cosmic_theme::Spacing">Spacing</a>,
|
|
pub corner_radii: <a class="struct" href="../cosmic_theme/struct.CornerRadii.html" title="struct cosmic::cosmic_theme::CornerRadii">CornerRadii</a>,
|
|
pub is_dark: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,
|
|
pub is_high_contrast: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,
|
|
pub gaps: (<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>),
|
|
pub active_hint: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>,
|
|
pub window_hint: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../cosmic_theme/palette/rgb/struct.Rgb.html" title="struct cosmic::cosmic_theme::palette::rgb::Rgb">Rgb</a>>,
|
|
pub is_frosted: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,
|
|
pub shade: <a class="struct" href="../cosmic_theme/palette/struct.Alpha.html" title="struct cosmic::cosmic_theme::palette::Alpha">Alpha</a><<a class="struct" href="../cosmic_theme/palette/rgb/struct.Rgb.html" title="struct cosmic::cosmic_theme::palette::rgb::Rgb">Rgb</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>>,
|
|
pub accent_text: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../cosmic_theme/palette/struct.Alpha.html" title="struct cosmic::cosmic_theme::palette::Alpha">Alpha</a><<a class="struct" href="../cosmic_theme/palette/rgb/struct.Rgb.html" title="struct cosmic::cosmic_theme::palette::rgb::Rgb">Rgb</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>>>,
|
|
pub control_tint: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../cosmic_theme/palette/rgb/struct.Rgb.html" title="struct cosmic::cosmic_theme::palette::rgb::Rgb">Rgb</a>>,
|
|
pub text_tint: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../cosmic_theme/palette/rgb/struct.Rgb.html" title="struct cosmic::cosmic_theme::palette::rgb::Rgb">Rgb</a>>,
|
|
</details>}</code></pre><h2 id="fields" class="fields section-header">Fields<a href="#fields" class="anchor">§</a></h2><span id="structfield.name" class="structfield section-header"><a href="#structfield.name" class="anchor field">§</a><code>name: <a class="struct" href="../cctk/sctk/reexports/client/backend/smallvec/alloc/string/struct.String.html" title="struct cosmic::cctk::sctk::reexports::client::backend::smallvec::alloc::string::String">String</a></code></span><div class="docblock"><p>name of the theme</p>
|
|
</div><span id="structfield.background" class="structfield section-header"><a href="#structfield.background" class="anchor field">§</a><code>background: <a class="struct" href="../cosmic_theme/struct.Container.html" title="struct cosmic::cosmic_theme::Container">Container</a></code></span><div class="docblock"><p>background element colors</p>
|
|
</div><span id="structfield.primary" class="structfield section-header"><a href="#structfield.primary" class="anchor field">§</a><code>primary: <a class="struct" href="../cosmic_theme/struct.Container.html" title="struct cosmic::cosmic_theme::Container">Container</a></code></span><div class="docblock"><p>primary element colors</p>
|
|
</div><span id="structfield.secondary" class="structfield section-header"><a href="#structfield.secondary" class="anchor field">§</a><code>secondary: <a class="struct" href="../cosmic_theme/struct.Container.html" title="struct cosmic::cosmic_theme::Container">Container</a></code></span><div class="docblock"><p>secondary element colors</p>
|
|
</div><span id="structfield.accent" class="structfield section-header"><a href="#structfield.accent" class="anchor field">§</a><code>accent: <a class="struct" href="../cosmic_theme/struct.Component.html" title="struct cosmic::cosmic_theme::Component">Component</a></code></span><div class="docblock"><p>accent element colors</p>
|
|
</div><span id="structfield.success" class="structfield section-header"><a href="#structfield.success" class="anchor field">§</a><code>success: <a class="struct" href="../cosmic_theme/struct.Component.html" title="struct cosmic::cosmic_theme::Component">Component</a></code></span><div class="docblock"><p>suggested element colors</p>
|
|
</div><span id="structfield.destructive" class="structfield section-header"><a href="#structfield.destructive" class="anchor field">§</a><code>destructive: <a class="struct" href="../cosmic_theme/struct.Component.html" title="struct cosmic::cosmic_theme::Component">Component</a></code></span><div class="docblock"><p>destructive element colors</p>
|
|
</div><span id="structfield.warning" class="structfield section-header"><a href="#structfield.warning" class="anchor field">§</a><code>warning: <a class="struct" href="../cosmic_theme/struct.Component.html" title="struct cosmic::cosmic_theme::Component">Component</a></code></span><div class="docblock"><p>warning element colors</p>
|
|
</div><span id="structfield.accent_button" class="structfield section-header"><a href="#structfield.accent_button" class="anchor field">§</a><code>accent_button: <a class="struct" href="../cosmic_theme/struct.Component.html" title="struct cosmic::cosmic_theme::Component">Component</a></code></span><div class="docblock"><p>accent button element colors</p>
|
|
</div><span id="structfield.success_button" class="structfield section-header"><a href="#structfield.success_button" class="anchor field">§</a><code>success_button: <a class="struct" href="../cosmic_theme/struct.Component.html" title="struct cosmic::cosmic_theme::Component">Component</a></code></span><div class="docblock"><p>suggested button element colors</p>
|
|
</div><span id="structfield.destructive_button" class="structfield section-header"><a href="#structfield.destructive_button" class="anchor field">§</a><code>destructive_button: <a class="struct" href="../cosmic_theme/struct.Component.html" title="struct cosmic::cosmic_theme::Component">Component</a></code></span><div class="docblock"><p>destructive button element colors</p>
|
|
</div><span id="structfield.warning_button" class="structfield section-header"><a href="#structfield.warning_button" class="anchor field">§</a><code>warning_button: <a class="struct" href="../cosmic_theme/struct.Component.html" title="struct cosmic::cosmic_theme::Component">Component</a></code></span><div class="docblock"><p>warning button element colors</p>
|
|
</div><span id="structfield.icon_button" class="structfield section-header"><a href="#structfield.icon_button" class="anchor field">§</a><code>icon_button: <a class="struct" href="../cosmic_theme/struct.Component.html" title="struct cosmic::cosmic_theme::Component">Component</a></code></span><div class="docblock"><p>icon button element colors</p>
|
|
</div><span id="structfield.link_button" class="structfield section-header"><a href="#structfield.link_button" class="anchor field">§</a><code>link_button: <a class="struct" href="../cosmic_theme/struct.Component.html" title="struct cosmic::cosmic_theme::Component">Component</a></code></span><div class="docblock"><p>link button element colors</p>
|
|
</div><span id="structfield.text_button" class="structfield section-header"><a href="#structfield.text_button" class="anchor field">§</a><code>text_button: <a class="struct" href="../cosmic_theme/struct.Component.html" title="struct cosmic::cosmic_theme::Component">Component</a></code></span><div class="docblock"><p>text button element colors</p>
|
|
</div><span id="structfield.button" class="structfield section-header"><a href="#structfield.button" class="anchor field">§</a><code>button: <a class="struct" href="../cosmic_theme/struct.Component.html" title="struct cosmic::cosmic_theme::Component">Component</a></code></span><div class="docblock"><p>button component styling</p>
|
|
</div><span id="structfield.palette" class="structfield section-header"><a href="#structfield.palette" class="anchor field">§</a><code>palette: <a class="struct" href="../cosmic_theme/struct.CosmicPaletteInner.html" title="struct cosmic::cosmic_theme::CosmicPaletteInner">CosmicPaletteInner</a></code></span><div class="docblock"><p>palette</p>
|
|
</div><span id="structfield.spacing" class="structfield section-header"><a href="#structfield.spacing" class="anchor field">§</a><code>spacing: <a class="struct" href="../cosmic_theme/struct.Spacing.html" title="struct cosmic::cosmic_theme::Spacing">Spacing</a></code></span><div class="docblock"><p>spacing</p>
|
|
</div><span id="structfield.corner_radii" class="structfield section-header"><a href="#structfield.corner_radii" class="anchor field">§</a><code>corner_radii: <a class="struct" href="../cosmic_theme/struct.CornerRadii.html" title="struct cosmic::cosmic_theme::CornerRadii">CornerRadii</a></code></span><div class="docblock"><p>corner radii</p>
|
|
</div><span id="structfield.is_dark" class="structfield section-header"><a href="#structfield.is_dark" class="anchor field">§</a><code>is_dark: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><div class="docblock"><p>is dark</p>
|
|
</div><span id="structfield.is_high_contrast" class="structfield section-header"><a href="#structfield.is_high_contrast" class="anchor field">§</a><code>is_high_contrast: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><div class="docblock"><p>is high contrast</p>
|
|
</div><span id="structfield.gaps" class="structfield section-header"><a href="#structfield.gaps" class="anchor field">§</a><code>gaps: (<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>)</code></span><div class="docblock"><p>cosmic-comp window gaps size (outer, inner)</p>
|
|
</div><span id="structfield.active_hint" class="structfield section-header"><a href="#structfield.active_hint" class="anchor field">§</a><code>active_hint: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code></span><div class="docblock"><p>cosmic-comp active hint window outline width</p>
|
|
</div><span id="structfield.window_hint" class="structfield section-header"><a href="#structfield.window_hint" class="anchor field">§</a><code>window_hint: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../cosmic_theme/palette/rgb/struct.Rgb.html" title="struct cosmic::cosmic_theme::palette::rgb::Rgb">Rgb</a>></code></span><div class="docblock"><p>cosmic-comp custom window hint color</p>
|
|
</div><span id="structfield.is_frosted" class="structfield section-header"><a href="#structfield.is_frosted" class="anchor field">§</a><code>is_frosted: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><div class="docblock"><p>enables blurred transparency</p>
|
|
</div><span id="structfield.shade" class="structfield section-header"><a href="#structfield.shade" class="anchor field">§</a><code>shade: <a class="struct" href="../cosmic_theme/palette/struct.Alpha.html" title="struct cosmic::cosmic_theme::palette::Alpha">Alpha</a><<a class="struct" href="../cosmic_theme/palette/rgb/struct.Rgb.html" title="struct cosmic::cosmic_theme::palette::rgb::Rgb">Rgb</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>></code></span><div class="docblock"><p>shade color for dialogs</p>
|
|
</div><span id="structfield.accent_text" class="structfield section-header"><a href="#structfield.accent_text" class="anchor field">§</a><code>accent_text: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../cosmic_theme/palette/struct.Alpha.html" title="struct cosmic::cosmic_theme::palette::Alpha">Alpha</a><<a class="struct" href="../cosmic_theme/palette/rgb/struct.Rgb.html" title="struct cosmic::cosmic_theme::palette::rgb::Rgb">Rgb</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>>></code></span><div class="docblock"><p>accent text colors
|
|
If None, accent base color is the accent text color.</p>
|
|
</div><span id="structfield.control_tint" class="structfield section-header"><a href="#structfield.control_tint" class="anchor field">§</a><code>control_tint: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../cosmic_theme/palette/rgb/struct.Rgb.html" title="struct cosmic::cosmic_theme::palette::rgb::Rgb">Rgb</a>></code></span><div class="docblock"><p>control tint color</p>
|
|
</div><span id="structfield.text_tint" class="structfield section-header"><a href="#structfield.text_tint" class="anchor field">§</a><code>text_tint: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../cosmic_theme/palette/rgb/struct.Rgb.html" title="struct cosmic::cosmic_theme::palette::rgb::Rgb">Rgb</a>></code></span><div class="docblock"><p>text tint color</p>
|
|
</div><script src="../../type.impl/cosmic/cosmic_theme/struct.Theme.js" data-self-path="cosmic::theme::CosmicTheme" async></script></section></div></main></body></html> |