diff --git a/lib/config/app_config.dart b/lib/config/app_config.dart index 548e0a90a..ef4487e9a 100644 --- a/lib/config/app_config.dart +++ b/lib/config/app_config.dart @@ -23,8 +23,8 @@ abstract class AppConfig { static const bool allowOtherHomeservers = true; static const bool enableRegistration = true; static const double toolbarMaxHeight = 300.0; - static const double toolbarMinHeight = 70.0; - static const double toolbarMinWidth = 270.0; + static const double toolbarMinHeight = 175.0; + static const double toolbarMinWidth = 350.0; static const double toolbarButtonsHeight = 50.0; // #Pangea // static const Color primaryColor = Color(0xFF5625BA); diff --git a/lib/pangea/utils/bot_style.dart b/lib/pangea/utils/bot_style.dart index 1a3a2f8fb..36f9cb85d 100644 --- a/lib/pangea/utils/bot_style.dart +++ b/lib/pangea/utils/bot_style.dart @@ -9,11 +9,10 @@ class BotStyle { bool setColor = true, bool big = false, bool italics = false, - bool bold = true, + bool bold = false, }) { try { final TextStyle botStyle = TextStyle( - fontFamily: 'Inconsolata', fontWeight: bold ? FontWeight.w700 : null, fontSize: AppConfig.messageFontSize * AppConfig.fontSizeFactor * diff --git a/lib/pangea/widgets/chat/message_selection_overlay.dart b/lib/pangea/widgets/chat/message_selection_overlay.dart index 80263c62f..f6a266f95 100644 --- a/lib/pangea/widgets/chat/message_selection_overlay.dart +++ b/lib/pangea/widgets/chat/message_selection_overlay.dart @@ -491,6 +491,7 @@ class MessageOverlayController extends State overLayController: this, tts: tts, ), + const SizedBox(height: 8), SizedBox( height: adjustedMessageHeight, child: OverlayMessage( diff --git a/lib/pangea/widgets/chat/message_toolbar.dart b/lib/pangea/widgets/chat/message_toolbar.dart index ffca4f32c..79561ef06 100644 --- a/lib/pangea/widgets/chat/message_toolbar.dart +++ b/lib/pangea/widgets/chat/message_toolbar.dart @@ -124,10 +124,6 @@ class MessageToolbar extends StatelessWidget { return Container( decoration: BoxDecoration( color: Theme.of(context).cardColor, - border: Border.all( - width: 2, - color: Theme.of(context).colorScheme.primary.withOpacity(0.5), - ), borderRadius: const BorderRadius.all( Radius.circular(AppConfig.borderRadius), ), @@ -138,11 +134,15 @@ class MessageToolbar extends StatelessWidget { minHeight: AppConfig.toolbarMinHeight, // maxWidth is set by MessageSelectionOverlay ), - child: SingleChildScrollView( - child: AnimatedSize( - duration: FluffyThemes.animationDuration, - child: toolbarContent(context), - ), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + AnimatedSize( + duration: FluffyThemes.animationDuration, + child: toolbarContent(context), + ), + ], ), ); } diff --git a/lib/pangea/widgets/chat/message_translation_card.dart b/lib/pangea/widgets/chat/message_translation_card.dart index 3c0d750a3..0f95a3e55 100644 --- a/lib/pangea/widgets/chat/message_translation_card.dart +++ b/lib/pangea/widgets/chat/message_translation_card.dart @@ -147,35 +147,25 @@ class MessageTranslationCardState extends State { return Padding( padding: const EdgeInsets.fromLTRB(16, 20, 16, 16), - child: Row( - mainAxisSize: MainAxisSize.min, + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center, children: [ - Flexible( - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - widget.selection != null - ? selectionTranslation! - : repEvent!.text, - style: BotStyle.text(context), - textAlign: TextAlign.center, - ), - if (notGoingToTranslate && widget.selection == null) - InlineTooltip( - instructionsEnum: InstructionsEnum.l1Translation, - onClose: () => setState(() {}), - ), - if (widget.selection != null) - InlineTooltip( - instructionsEnum: InstructionsEnum.clickAgainToDeselect, - onClose: () => setState(() {}), - ), - ], - ), + Text( + widget.selection != null ? selectionTranslation! : repEvent!.text, + style: BotStyle.text(context), + textAlign: TextAlign.center, ), + if (notGoingToTranslate && widget.selection == null) + InlineTooltip( + instructionsEnum: InstructionsEnum.l1Translation, + onClose: () => setState(() {}), + ), + if (widget.selection != null) + InlineTooltip( + instructionsEnum: InstructionsEnum.clickAgainToDeselect, + onClose: () => setState(() {}), + ), ], ), ); diff --git a/lib/pangea/widgets/practice_activity/multiple_choice_activity.dart b/lib/pangea/widgets/practice_activity/multiple_choice_activity.dart index a477efa9b..d37084283 100644 --- a/lib/pangea/widgets/practice_activity/multiple_choice_activity.dart +++ b/lib/pangea/widgets/practice_activity/multiple_choice_activity.dart @@ -6,6 +6,7 @@ import 'package:fluffychat/pangea/controllers/my_analytics_controller.dart'; import 'package:fluffychat/pangea/enum/activity_type_enum.dart'; import 'package:fluffychat/pangea/models/practice_activities.dart/practice_activity_model.dart'; import 'package:fluffychat/pangea/models/practice_activities.dart/practice_activity_record_model.dart'; +import 'package:fluffychat/pangea/utils/bot_style.dart'; import 'package:fluffychat/pangea/widgets/chat/tts_controller.dart'; import 'package:fluffychat/pangea/widgets/practice_activity/practice_activity_card.dart'; import 'package:fluffychat/pangea/widgets/practice_activity/word_audio_button.dart'; @@ -108,10 +109,7 @@ class MultipleChoiceActivityState extends State { children: [ Text( practiceActivity.content.question, - style: const TextStyle( - fontSize: 16, - fontWeight: FontWeight.bold, - ), + style: BotStyle.text(context), ), const SizedBox(height: 8), if (practiceActivity.activityType ==