increase minimum dimensions of toolbar

This commit is contained in:
ggurdin 2024-11-06 16:20:18 -05:00
parent faabe5a903
commit d033547128
No known key found for this signature in database
GPG key ID: A01CB41737CBB478
3 changed files with 29 additions and 32 deletions

View file

@ -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);

View file

@ -138,10 +138,17 @@ class MessageToolbar extends StatelessWidget {
minHeight: AppConfig.toolbarMinHeight,
// maxWidth is set by MessageSelectionOverlay
),
child: SingleChildScrollView(
child: AnimatedSize(
duration: FluffyThemes.animationDuration,
child: toolbarContent(context),
child: Container(
decoration: BoxDecoration(border: Border.all(color: Colors.green)),
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: [
AnimatedSize(
duration: FluffyThemes.animationDuration,
child: toolbarContent(context),
),
],
),
),
);

View file

@ -147,35 +147,25 @@ class MessageTranslationCardState extends State<MessageTranslationCard> {
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(() {}),
),
],
),
);