From 6a666839b628af8b70db5f1bf4c68d339a388352 Mon Sep 17 00:00:00 2001 From: just_stuff_tm <133525672+just-stuff-tm@users.noreply.github.com> Date: Thu, 12 Feb 2026 00:05:00 -0500 Subject: [PATCH] Fix battery chemistry dropdown layout overflow --- lib/screens/app_settings_screen.dart | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/lib/screens/app_settings_screen.dart b/lib/screens/app_settings_screen.dart index 135babd..4e31733 100644 --- a/lib/screens/app_settings_screen.dart +++ b/lib/screens/app_settings_screen.dart @@ -384,6 +384,7 @@ class AppSettingsScreen extends StatelessWidget { ); } + // Fixed rendering issues Widget _buildBatteryCard( BuildContext context, AppSettingsService settingsService, @@ -399,6 +400,7 @@ class AppSettingsScreen extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ + const SizedBox(height: 4), Padding( padding: const EdgeInsets.fromLTRB(16, 16, 16, 8), child: Text( @@ -406,6 +408,8 @@ class AppSettingsScreen extends StatelessWidget { style: const TextStyle(fontSize: 18, fontWeight: FontWeight.bold), ), ), + + // Main tile (icon + text only) ListTile( leading: const Icon(Icons.battery_full), title: Text(context.l10n.appSettings_batteryChemistry), @@ -416,8 +420,19 @@ class AppSettingsScreen extends StatelessWidget { ) : context.l10n.appSettings_batteryChemistryConnectFirst, ), - trailing: DropdownButton( - value: selection, + contentPadding: const EdgeInsets.symmetric(horizontal: 16), + ), + + // Dropdown (separate full-width row) + Padding( + padding: const EdgeInsets.fromLTRB(16, 0, 16, 16), + child: DropdownButtonFormField( + initialValue: selection, + isExpanded: true, + decoration: const InputDecoration( + border: UnderlineInputBorder(), + isDense: true, + ), onChanged: isConnected ? (value) { if (value != null) {