feat: set placeholder for permission dropdowns
This commit is contained in:
parent
4c6f2db5f2
commit
23b5d98dcc
3 changed files with 5 additions and 14 deletions
17
src/tab.rs
17
src/tab.rs
|
|
@ -6445,17 +6445,6 @@ impl Tab {
|
|||
|
||||
#[cfg(unix)]
|
||||
{
|
||||
// The following is a bit of a hack to make the dropdown selector
|
||||
// fill the available space when selected is None so it can be
|
||||
// clicked on easier.
|
||||
fn dropdown_width(use_default: bool) -> Length {
|
||||
if use_default {
|
||||
Length::Shrink
|
||||
} else {
|
||||
Length::Fill
|
||||
}
|
||||
}
|
||||
|
||||
// Only return mode part if it's the only one
|
||||
fn selected_mode_part(mut modes: BTreeSet<u32>) -> Option<usize> {
|
||||
match (modes.pop_first(), modes.pop_first()) {
|
||||
|
|
@ -6491,7 +6480,7 @@ impl Tab {
|
|||
)
|
||||
},
|
||||
)
|
||||
.width(dropdown_width(mode_part_user.is_some())),
|
||||
.placeholder(fl!("mixed")),
|
||||
),
|
||||
);
|
||||
|
||||
|
|
@ -6511,7 +6500,7 @@ impl Tab {
|
|||
)
|
||||
},
|
||||
)
|
||||
.width(dropdown_width(mode_part_group.is_some())),
|
||||
.placeholder(fl!("mixed")),
|
||||
),
|
||||
);
|
||||
|
||||
|
|
@ -6529,7 +6518,7 @@ impl Tab {
|
|||
)
|
||||
},
|
||||
)
|
||||
.width(dropdown_width(mode_part_other.is_some())),
|
||||
.placeholder(fl!("mixed")),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue