forked from cwtch.im/cwtch-ui
Fix maximum width of dropdown boxes in settings
This commit is contained in:
parent
ecdcef2192
commit
0146436cb3
|
@ -107,7 +107,9 @@ class _GlobalSettingsViewState extends State<GlobalSettingsView> {
|
|||
ListTile(
|
||||
title: Text(AppLocalizations.of(context)!.settingLanguage, style: TextStyle(color: settings.current().mainTextColor)),
|
||||
leading: Icon(CwtchIcons.change_language, color: settings.current().mainTextColor),
|
||||
trailing: DropdownButton(
|
||||
trailing: Container(
|
||||
width: MediaQuery.of(context).size.width / 4,
|
||||
child: DropdownButton(
|
||||
value: Provider.of<Settings>(context).locale.languageCode,
|
||||
onChanged: (String? newValue) {
|
||||
setState(() {
|
||||
|
@ -120,7 +122,7 @@ class _GlobalSettingsViewState extends State<GlobalSettingsView> {
|
|||
value: value.languageCode,
|
||||
child: Text(getLanguageFull(context, value.languageCode)),
|
||||
);
|
||||
}).toList())),
|
||||
}).toList()))),
|
||||
SwitchListTile(
|
||||
title: Text(AppLocalizations.of(context)!.settingTheme, style: TextStyle(color: settings.current().mainTextColor)),
|
||||
value: settings.current().mode == mode_light,
|
||||
|
@ -140,7 +142,9 @@ class _GlobalSettingsViewState extends State<GlobalSettingsView> {
|
|||
),
|
||||
ListTile(
|
||||
title: Text(AppLocalizations.of(context)!.themeColorLabel),
|
||||
trailing: DropdownButton<String>(
|
||||
trailing: Container(
|
||||
width: MediaQuery.of(context).size.width / 4,
|
||||
child: DropdownButton<String>(
|
||||
key: Key("DropdownTheme"),
|
||||
isDense: true,
|
||||
value: Provider.of<Settings>(context).theme.theme,
|
||||
|
@ -155,13 +159,15 @@ class _GlobalSettingsViewState extends State<GlobalSettingsView> {
|
|||
value: themeId,
|
||||
child: Text(getThemeName(context, themeId)), //"ddi_$themeId", key: Key("ddi_$themeId")),
|
||||
);
|
||||
}).toList()),
|
||||
}).toList())),
|
||||
leading: Icon(CwtchIcons.change_theme, color: settings.current().mainTextColor),
|
||||
),
|
||||
ListTile(
|
||||
title: Text(AppLocalizations.of(context)!.settingUIColumnPortrait, style: TextStyle(color: settings.current().mainTextColor)),
|
||||
leading: Icon(Icons.table_chart, color: settings.current().mainTextColor),
|
||||
trailing: DropdownButton(
|
||||
trailing: Container(
|
||||
width: MediaQuery.of(context).size.width / 4,
|
||||
child: DropdownButton(
|
||||
value: settings.uiColumnModePortrait.toString(),
|
||||
onChanged: (String? newValue) {
|
||||
settings.uiColumnModePortrait = Settings.uiColumnModeFromString(newValue!);
|
||||
|
@ -172,7 +178,7 @@ class _GlobalSettingsViewState extends State<GlobalSettingsView> {
|
|||
value: value.toString(),
|
||||
child: Text(Settings.uiColumnModeToString(value, context)),
|
||||
);
|
||||
}).toList())),
|
||||
}).toList()))),
|
||||
ListTile(
|
||||
title: Text(
|
||||
AppLocalizations.of(context)!.settingUIColumnLandscape,
|
||||
|
@ -182,6 +188,8 @@ class _GlobalSettingsViewState extends State<GlobalSettingsView> {
|
|||
),
|
||||
leading: Icon(Icons.table_chart, color: settings.current().mainTextColor),
|
||||
trailing: Container(
|
||||
width: MediaQuery.of(context).size.width / 4,
|
||||
child: Container(
|
||||
width: MediaQuery.of(context).size.width / 4,
|
||||
child: DropdownButton(
|
||||
isExpanded: true,
|
||||
|
@ -198,7 +206,7 @@ class _GlobalSettingsViewState extends State<GlobalSettingsView> {
|
|||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
);
|
||||
}).toList()))),
|
||||
}).toList())))),
|
||||
SwitchListTile(
|
||||
title: Text(AppLocalizations.of(context)!.streamerModeLabel, style: TextStyle(color: settings.current().mainTextColor)),
|
||||
subtitle: Text(AppLocalizations.of(context)!.descriptionStreamerMode),
|
||||
|
@ -238,7 +246,9 @@ class _GlobalSettingsViewState extends State<GlobalSettingsView> {
|
|||
ListTile(
|
||||
title: Text(AppLocalizations.of(context)!.notificationPolicySettingLabel),
|
||||
subtitle: Text(AppLocalizations.of(context)!.notificationPolicySettingDescription),
|
||||
trailing: DropdownButton(
|
||||
trailing: Container(
|
||||
width: MediaQuery.of(context).size.width / 4,
|
||||
child: DropdownButton(
|
||||
value: settings.notificationPolicy,
|
||||
onChanged: (NotificationPolicy? newValue) {
|
||||
settings.notificationPolicy = newValue!;
|
||||
|
@ -252,7 +262,7 @@ class _GlobalSettingsViewState extends State<GlobalSettingsView> {
|
|||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
);
|
||||
}).toList()),
|
||||
}).toList())),
|
||||
leading: Icon(CwtchIcons.chat_bubble_empty_24px, color: settings.current().mainTextColor),
|
||||
),
|
||||
ListTile(
|
||||
|
|
Loading…
Reference in New Issue