From 23b5d98dcc3fef32e9ca6b734be94834a8f7013a Mon Sep 17 00:00:00 2001 From: Jonatan Pettersson Date: Fri, 16 Jan 2026 21:54:31 +0100 Subject: [PATCH] feat: set placeholder for permission dropdowns --- i18n/en/cosmic_files.ftl | 1 + i18n/sv/cosmic_files.ftl | 1 + src/tab.rs | 17 +++-------------- 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/i18n/en/cosmic_files.ftl b/i18n/en/cosmic_files.ftl index 654e9ab..6a852bb 100644 --- a/i18n/en/cosmic_files.ftl +++ b/i18n/en/cosmic_files.ftl @@ -131,6 +131,7 @@ open-with = Open with owner = Owner group = Group other = Other +mixed = Mixed ### Mode 0 none = None ### Mode 1 (unusual) diff --git a/i18n/sv/cosmic_files.ftl b/i18n/sv/cosmic_files.ftl index 2527c4e..cbd28dd 100644 --- a/i18n/sv/cosmic_files.ftl +++ b/i18n/sv/cosmic_files.ftl @@ -101,6 +101,7 @@ open-with = Öppna med owner = Ägare group = Grupp other = Andra +mixed = Blandade # Listvy name = Namn modified = Ändrad diff --git a/src/tab.rs b/src/tab.rs index 31a82d4..08b2c45 100644 --- a/src/tab.rs +++ b/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) -> Option { 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")), ), ); }