parent
a2b1ba522a
commit
fa433743b3
2 changed files with 31 additions and 4 deletions
|
|
@ -31,6 +31,7 @@ where
|
|||
bounds: Rectangle,
|
||||
cursor_position: Point,
|
||||
selected: Option<String>,
|
||||
placeholder: Option<String>,
|
||||
padding: Padding,
|
||||
text_size: u16,
|
||||
font: Font,
|
||||
|
|
@ -68,7 +69,7 @@ where
|
|||
|
||||
(
|
||||
Primitive::Group {
|
||||
primitives: if let Some(label) = selected {
|
||||
primitives: if let Some(label) = selected.or(placeholder) {
|
||||
let label = Primitive::Text {
|
||||
content: label,
|
||||
size: f32::from(text_size),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue