chore: Adjust design

This commit is contained in:
Christian Kußowski 2026-02-14 18:28:36 +01:00
commit 65c3566dbd
No known key found for this signature in database
GPG key ID: E067ECD60F1A0652
5 changed files with 106 additions and 96 deletions

View file

@ -19,13 +19,17 @@ import 'input_bar.dart';
class ChatInputRow extends StatelessWidget {
final ChatController controller;
static const double height = 56.0;
const ChatInputRow(this.controller, {super.key});
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
const height = 48.0;
final textMessageOnly =
controller.sendController.text.isNotEmpty ||
controller.replyEvent != null ||
controller.editEvent != null;
if (!controller.room.otherPartyCanReceiveMessages) {
return Center(
@ -128,9 +132,7 @@ class ChatInputRow extends StatelessWidget {
AnimatedContainer(
duration: FluffyThemes.animationDuration,
curve: FluffyThemes.animationCurve,
width: controller.sendController.text.isNotEmpty
? 0
: height,
width: textMessageOnly ? 0 : 48,
height: height,
alignment: Alignment.center,
decoration: const BoxDecoration(),
@ -221,9 +223,7 @@ class ChatInputRow extends StatelessWidget {
AnimatedContainer(
duration: FluffyThemes.animationDuration,
curve: FluffyThemes.animationCurve,
width: controller.sendController.text.isNotEmpty
? 0
: height,
width: textMessageOnly ? 0 : 48,
height: height,
alignment: Alignment.center,
decoration: const BoxDecoration(),
@ -267,7 +267,7 @@ class ChatInputRow extends StatelessWidget {
),
Container(
height: height,
width: height,
width: 48,
alignment: Alignment.center,
child: IconButton(
tooltip: L10n.of(context).emojis,
@ -302,13 +302,13 @@ class ChatInputRow extends StatelessWidget {
Matrix.of(context).currentBundle!.length > 1)
Container(
height: height,
width: height,
width: 48,
alignment: Alignment.center,
child: _ChatAccountPicker(controller),
),
Expanded(
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 0.0),
padding: const EdgeInsets.symmetric(vertical: 2.0),
child: InputBar(
room: controller.room,
minLines: 1,
@ -358,9 +358,7 @@ class ChatInputRow extends StatelessWidget {
height: height,
width: height,
alignment: Alignment.center,
child:
PlatformInfos.platformCanRecord &&
controller.sendController.text.isEmpty
child: PlatformInfos.platformCanRecord && !textMessageOnly
? IconButton(
tooltip: L10n.of(context).voiceMessage,
onPressed: () =>