feat: set placeholder for permission dropdowns
This commit is contained in:
parent
4c6f2db5f2
commit
23b5d98dcc
3 changed files with 5 additions and 14 deletions
|
|
@ -131,6 +131,7 @@ open-with = Open with
|
||||||
owner = Owner
|
owner = Owner
|
||||||
group = Group
|
group = Group
|
||||||
other = Other
|
other = Other
|
||||||
|
mixed = Mixed
|
||||||
### Mode 0
|
### Mode 0
|
||||||
none = None
|
none = None
|
||||||
### Mode 1 (unusual)
|
### Mode 1 (unusual)
|
||||||
|
|
|
||||||
|
|
@ -101,6 +101,7 @@ open-with = Öppna med
|
||||||
owner = Ägare
|
owner = Ägare
|
||||||
group = Grupp
|
group = Grupp
|
||||||
other = Andra
|
other = Andra
|
||||||
|
mixed = Blandade
|
||||||
# Listvy
|
# Listvy
|
||||||
name = Namn
|
name = Namn
|
||||||
modified = Ändrad
|
modified = Ändrad
|
||||||
|
|
|
||||||
17
src/tab.rs
17
src/tab.rs
|
|
@ -6445,17 +6445,6 @@ impl Tab {
|
||||||
|
|
||||||
#[cfg(unix)]
|
#[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
|
// Only return mode part if it's the only one
|
||||||
fn selected_mode_part(mut modes: BTreeSet<u32>) -> Option<usize> {
|
fn selected_mode_part(mut modes: BTreeSet<u32>) -> Option<usize> {
|
||||||
match (modes.pop_first(), modes.pop_first()) {
|
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