summaryrefslogtreecommitdiffstats
path: root/widget/src/pick_list.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2023-09-11 02:47:24 +0200
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2023-09-11 02:47:24 +0200
commit346af3f8b0baa418fd37b878bc2930ff0bd57cc0 (patch)
treeb11cde03595fb28bddb055507d272dd973634ab5 /widget/src/pick_list.rs
parent9245423c5d82f88c99adecaaf5dd2ac3559a05a8 (diff)
downloadiced-346af3f8b0baa418fd37b878bc2930ff0bd57cc0.tar.gz
iced-346af3f8b0baa418fd37b878bc2930ff0bd57cc0.tar.bz2
iced-346af3f8b0baa418fd37b878bc2930ff0bd57cc0.zip
Make `FontSystem` global and simplify `Paragraph` API
Diffstat (limited to 'widget/src/pick_list.rs')
-rw-r--r--widget/src/pick_list.rs22
1 files changed, 8 insertions, 14 deletions
diff --git a/widget/src/pick_list.rs b/widget/src/pick_list.rs
index 056a5e65..4b89d6ff 100644
--- a/widget/src/pick_list.rs
+++ b/widget/src/pick_list.rs
@@ -415,23 +415,17 @@ where
for (option, paragraph) in options.iter().zip(state.options.iter_mut()) {
let label = option.to_string();
- renderer.update_paragraph(
- paragraph,
- Text {
- content: &label,
- ..option_text
- },
- );
+ paragraph.update(Text {
+ content: &label,
+ ..option_text
+ });
}
if let Some(placeholder) = placeholder {
- renderer.update_paragraph(
- &mut state.placeholder,
- Text {
- content: placeholder,
- ..option_text
- },
- );
+ state.placeholder.update(Text {
+ content: placeholder,
+ ..option_text
+ });
}
let max_width = match width {