cosmic/theme/style/
dropdown.rs1use crate::Theme;
5use crate::widget::dropdown;
6use iced::{Background, Color};
7
8impl dropdown::menu::StyleSheet for Theme {
9 type Style = ();
10
11 fn appearance(&self, _style: &Self::Style) -> dropdown::menu::Appearance {
12 let cosmic = self.cosmic();
13
14 dropdown::menu::Appearance {
15 text_color: cosmic.on_bg_color().into(),
16 background: Background::Color(
17 cosmic.background(self.transparent).component.base.into(),
18 ),
19 border_width: 0.0,
20 border_radius: cosmic.corner_radii.radius_m.into(),
21 border_color: Color::TRANSPARENT,
22
23 hovered_text_color: cosmic.on_bg_color().into(),
24 hovered_background: Background::Color(
25 cosmic.primary(self.transparent).component.hover.into(),
26 ),
27
28 selected_text_color: cosmic.accent_text_color().into(),
29 selected_background: Background::Color(
30 cosmic.primary(self.transparent).component.hover.into(),
31 ),
32
33 description_color: cosmic
34 .primary(self.transparent)
35 .component
36 .on_disabled
37 .into(),
38 }
39 }
40}