feat: set placeholder for permission dropdowns

This commit is contained in:
Jonatan Pettersson 2026-01-16 21:54:31 +01:00 committed by Jacob Kauffmann
parent 4c6f2db5f2
commit 23b5d98dcc
3 changed files with 5 additions and 14 deletions

View file

@ -131,6 +131,7 @@ open-with = Open with
owner = Owner
group = Group
other = Other
mixed = Mixed
### Mode 0
none = None
### Mode 1 (unusual)

View file

@ -101,6 +101,7 @@ open-with = Öppna med
owner = Ägare
group = Grupp
other = Andra
mixed = Blandade
# Listvy
name = Namn
modified = Ändrad

View file

@ -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")),
),
);
}