diff options
author | 2022-11-10 01:10:28 +0100 | |
---|---|---|
committer | 2022-11-10 01:10:28 +0100 | |
commit | 4b3d0fb08d5b2e84c1061fa601b71363b6719f59 (patch) | |
tree | b5397a0ae874c523dcd755ff7e16f0ba5239f10e /style/src/menu.rs | |
parent | bec1f5bbe0e0fec0d57b66ee227c41f15165057e (diff) | |
download | iced-4b3d0fb08d5b2e84c1061fa601b71363b6719f59.tar.gz iced-4b3d0fb08d5b2e84c1061fa601b71363b6719f59.tar.bz2 iced-4b3d0fb08d5b2e84c1061fa601b71363b6719f59.zip |
Write documentation for `iced_style`
Diffstat (limited to 'style/src/menu.rs')
-rw-r--r-- | style/src/menu.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/style/src/menu.rs b/style/src/menu.rs index 409831a9..7d878748 100644 --- a/style/src/menu.rs +++ b/style/src/menu.rs @@ -1,19 +1,30 @@ +//! Change the appearance of menus. use iced_core::{Background, Color}; /// The appearance of a menu. #[derive(Debug, Clone, Copy)] pub struct Appearance { + /// The text [`Color`] of the menu. pub text_color: Color, + /// The [`Background`] of the menu. pub background: Background, + /// The border width of the menu. pub border_width: f32, + /// The border radius of the menu. pub border_radius: f32, + /// The border [`Color`] of the menu. pub border_color: Color, + /// The text [`Color`] of a selected option in the menu. pub selected_text_color: Color, + /// The background [`Color`] of a selected option in the menu. pub selected_background: Background, } +/// The style sheet of a menu. pub trait StyleSheet { + /// The supported style of the [`StyleSheet`]. type Style: Default + Clone; + /// Produces the [`Appearance`] of a menu. fn appearance(&self, style: &Self::Style) -> Appearance; } |