summaryrefslogtreecommitdiff
path: root/crates/material_theme/src
diff options
context:
space:
mode:
authorpml68 <contact@pml68.dev>2025-04-13 11:48:09 +0200
committerpml68 <contact@pml68.dev>2025-04-15 23:52:42 +0200
commit18df0db658698014bb5d0851cabfd9f5dc49c2c9 (patch)
tree96bed1cb66a1814040b7dc1d76a6dedce1a07ab1 /crates/material_theme/src
parentrefactor: move `material_theme` and `iced_drop` into separate crates dir (diff)
downloadiced-builder-18df0db658698014bb5d0851cabfd9f5dc49c2c9.tar.gz
feat(material_theme): tweak `pick_list` and `menu` borders
Diffstat (limited to 'crates/material_theme/src')
-rw-r--r--crates/material_theme/src/menu.rs7
-rw-r--r--crates/material_theme/src/pick_list.rs12
2 files changed, 15 insertions, 4 deletions
diff --git a/crates/material_theme/src/menu.rs b/crates/material_theme/src/menu.rs
index 9f43c72..5990c00 100644
--- a/crates/material_theme/src/menu.rs
+++ b/crates/material_theme/src/menu.rs
@@ -1,4 +1,4 @@
-use iced_widget::core::{Background, border};
+use iced_widget::core::{Background, Border, border};
use iced_widget::overlay::menu::{Catalog, Style, StyleFn};
use super::Theme;
@@ -20,7 +20,10 @@ pub fn default(theme: &Theme) -> Style {
let colors = theme.colorscheme.surface;
Style {
- border: border::rounded(4),
+ border: Border {
+ radius: border::bottom(4),
+ ..Default::default()
+ },
background: Background::Color(colors.surface_container.base),
text_color: colors.on_surface,
selected_background: Background::Color(mix(
diff --git a/crates/material_theme/src/pick_list.rs b/crates/material_theme/src/pick_list.rs
index c589100..25b09f8 100644
--- a/crates/material_theme/src/pick_list.rs
+++ b/crates/material_theme/src/pick_list.rs
@@ -1,4 +1,4 @@
-use iced_widget::core::{Background, border};
+use iced_widget::core::{Background, Border, border};
use iced_widget::pick_list::{Catalog, Status, Style, StyleFn};
use super::Theme;
@@ -32,9 +32,17 @@ pub fn default(theme: &Theme, status: Status) -> Style {
match status {
Status::Active => active,
- Status::Hovered | Status::Opened { .. } => Style {
+ Status::Hovered => Style {
background: Background::Color(surface.surface_container.highest),
..active
},
+ Status::Opened { .. } => Style {
+ background: Background::Color(surface.surface_container.highest),
+ border: Border {
+ radius: border::top(4),
+ ..Default::default()
+ },
+ ..active
+ },
}
}