Skip to content

High performance self-hosted photo and video management solution.

chore(mobile): full width language change dropdown (#8806)

Alex1aa8707b8a50
diff --git a/mobile/lib/modules/settings/ui/language_settings.dart b/mobile/lib/modules/settings/ui/language_settings.dart
index c3cdde6859..ebe8673135 100644
--- a/mobile/lib/modules/settings/ui/language_settings.dart
+++ b/mobile/lib/modules/settings/ui/language_settings.dart
@@ -23,36 +23,46 @@ class LanguageSettings extends HookConsumerWidget {
return ListView(
padding: const EdgeInsets.all(16),
children: [
- DropdownMenu(
- inputDecorationTheme: InputDecorationTheme(
- border: OutlineInputBorder(
- borderRadius: BorderRadius.circular(20),
- ),
- contentPadding: const EdgeInsets.only(left: 16),
- ),
- menuStyle: MenuStyle(
- shape: MaterialStatePropertyAll<OutlinedBorder>(
- RoundedRectangleBorder(
- borderRadius: BorderRadius.circular(15),
+ LayoutBuilder(
+ builder: (context, constraints) {
+ return DropdownMenu(
+ width: constraints.maxWidth,
+ inputDecorationTheme: InputDecorationTheme(
+ border: OutlineInputBorder(
+ borderRadius: BorderRadius.circular(20),
+ ),
+ contentPadding: const EdgeInsets.only(left: 16),
),
- ),
- ),
- menuHeight: context.height * 0.5,
- hintText: "Languages",
- label: const Text('Languages'),
- dropdownMenuEntries: locales.keys
- .map(
- (countryName) => DropdownMenuEntry(
- value: locales[countryName],
- label: countryName,
+ menuStyle: MenuStyle(
+ shape: MaterialStatePropertyAll<OutlinedBorder>(
+ RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(15),
+ ),
+ ),
+ backgroundColor: MaterialStatePropertyAll<Color>(
+ context.isDarkTheme
+ ? Colors.grey[900]!
+ : context.scaffoldBackgroundColor,
),
- )
- .toList(),
- controller: textController,
- onSelected: (value) {
- if (value != null) {
- selectedLocale.value = value;
- }
+ ),
+ menuHeight: context.height * 0.5,
+ hintText: "Languages",
+ label: const Text('Languages'),
+ dropdownMenuEntries: locales.keys
+ .map(
+ (countryName) => DropdownMenuEntry(
+ value: locales[countryName],
+ label: countryName,
+ ),
+ )
+ .toList(),
+ controller: textController,
+ onSelected: (value) {
+ if (value != null) {
+ selectedLocale.value = value;
+ }
+ },
+ );
},
),
const SizedBox(height: 16),