diff --git a/packages/neon/lib/src/pages/home/home.dart b/packages/neon/lib/src/pages/home/home.dart index 68b0d8df..5a6a7b2a 100644 --- a/packages/neon/lib/src/pages/home/home.dart +++ b/packages/neon/lib/src/pages/home/home.dart @@ -378,9 +378,7 @@ class _HomePageState extends State with tray.TrayListener, WindowListe if (accounts.length > 1) ...[ Text( account.client.humanReadableID, - style: Theme.of(context).textTheme.bodySmall!.copyWith( - color: Theme.of(context).colorScheme.onPrimary, - ), + style: Theme.of(context).textTheme.bodySmall!, ), ], ], diff --git a/packages/neon/lib/src/widgets/account_tile.dart b/packages/neon/lib/src/widgets/account_tile.dart index ad661553..9ffd1af4 100644 --- a/packages/neon/lib/src/widgets/account_tile.dart +++ b/packages/neon/lib/src/widgets/account_tile.dart @@ -50,11 +50,14 @@ class AccountTile extends StatelessWidget { Row( children: [ if (userDetailsData != null) ...[ - Text( - userDetailsData.getDisplayName()!, - style: Theme.of(context).textTheme.bodyLarge!.copyWith( - color: textColor, - ), + Flexible( + child: Text( + userDetailsData.getDisplayName()!, + style: Theme.of(context).textTheme.bodyLarge!.copyWith( + color: textColor, + ), + overflow: TextOverflow.ellipsis, + ), ), ], if (userDetailsLoading) ...[ @@ -88,6 +91,7 @@ class AccountTile extends StatelessWidget { style: Theme.of(context).textTheme.bodySmall!.copyWith( color: textColor, ), + overflow: TextOverflow.ellipsis, ), ); } diff --git a/packages/settings/lib/src/widgets/dropdown_button_settings_tile.dart b/packages/settings/lib/src/widgets/dropdown_button_settings_tile.dart index 43a12efa..e0e559b6 100644 --- a/packages/settings/lib/src/widgets/dropdown_button_settings_tile.dart +++ b/packages/settings/lib/src/widgets/dropdown_button_settings_tile.dart @@ -25,31 +25,44 @@ class DropdownButtonSettingsTile extends InputSettingsTile> { final context, final valuesSnapshot, ) => - ListTile( - title: Text( - option.label(context), - style: enabledSnapshot.data ?? false - ? null - : Theme.of(context).textTheme.subtitle1!.copyWith(color: Theme.of(context).disabledColor), + LayoutBuilder( + builder: (final context, final constraints) => ListTile( + title: Text( + option.label(context), + style: enabledSnapshot.data ?? false + ? null + : Theme.of(context).textTheme.subtitle1!.copyWith(color: Theme.of(context).disabledColor), + ), + trailing: valuesSnapshot.hasData + ? Container( + constraints: BoxConstraints( + maxWidth: constraints.maxWidth * 0.5, + ), + child: IntrinsicWidth( + child: DropdownButton( + isExpanded: true, + value: value, + items: valuesSnapshot.data!.keys + .map( + (final k) => DropdownMenuItem( + value: k, + child: Text( + valuesSnapshot.data![k]!(context), + overflow: TextOverflow.ellipsis, + ), + ), + ) + .toList(), + onChanged: enabledSnapshot.data ?? false + ? (final value) async { + await option.set(value as T); + } + : null, + ), + ), + ) + : null, ), - trailing: valuesSnapshot.hasData - ? DropdownButton( - value: value, - items: valuesSnapshot.data!.keys - .map( - (final k) => DropdownMenuItem( - value: k, - child: Text(valuesSnapshot.data![k]!(context)), - ), - ) - .toList(), - onChanged: enabledSnapshot.data ?? false - ? (final value) async { - await option.set(value as T); - } - : null, - ) - : null, ), ), ),