diff --git a/lib/config/themes.dart b/lib/config/themes.dart index f64dc96fa..f03c74d4f 100644 --- a/lib/config/themes.dart +++ b/lib/config/themes.dart @@ -116,7 +116,12 @@ abstract class FluffyThemes { ), outlinedButtonTheme: OutlinedButtonThemeData( style: OutlinedButton.styleFrom( + side: BorderSide( + width: 1, + color: colorScheme.primary, + ), shape: RoundedRectangleBorder( + side: BorderSide(color: colorScheme.primary), borderRadius: BorderRadius.circular(AppConfig.borderRadius / 2), ), ), diff --git a/lib/pages/chat_details/chat_details_view.dart b/lib/pages/chat_details/chat_details_view.dart index 3068b3925..6728f03c2 100644 --- a/lib/pages/chat_details/chat_details_view.dart +++ b/lib/pages/chat_details/chat_details_view.dart @@ -188,26 +188,26 @@ class ChatDetailsView extends StatelessWidget { height: 1, color: Theme.of(context).dividerColor, ), - ListTile( - onTap: room.canSendEvent(EventTypes.RoomTopic) - ? controller.setTopicAction - : null, - trailing: room.canSendEvent(EventTypes.RoomTopic) - ? Icon( - Icons.edit_outlined, - color: Theme.of(context) - .colorScheme - .onBackground, - ) - : null, - title: Text( - L10n.of(context)!.groupDescription, - style: TextStyle( - color: Theme.of(context).colorScheme.secondary, - fontWeight: FontWeight.bold, + if (!room.canChangeStateEvent(EventTypes.RoomTopic)) + ListTile( + title: Text( + L10n.of(context)!.groupDescription, + style: TextStyle( + color: Theme.of(context).colorScheme.secondary, + fontWeight: FontWeight.bold, + ), + ), + ) + else + Padding( + padding: const EdgeInsets.all(16.0), + child: OutlinedButton.icon( + onPressed: controller.setTopicAction, + label: + Text(L10n.of(context)!.setGroupDescription), + icon: const Icon(Icons.edit_outlined), ), ), - ), Padding( padding: const EdgeInsets.symmetric( horizontal: 16.0,