added border radius to overlay header

This commit is contained in:
ggurdin 2024-11-15 14:44:57 -05:00
parent cdce25813a
commit 2106c5af66
No known key found for this signature in database
GPG key ID: A01CB41737CBB478
4 changed files with 68 additions and 54 deletions

View file

@ -658,6 +658,7 @@ class MessageOverlayController extends State<MessageSelectionOverlay>
),
),
Material(
type: MaterialType.transparency,
child: OverlayHeader(controller: widget.chatController),
),
],

View file

@ -1,3 +1,4 @@
import 'package:fluffychat/config/app_config.dart';
import 'package:fluffychat/config/themes.dart';
import 'package:fluffychat/pages/chat/chat.dart';
import 'package:fluffychat/pages/chat/chat_input_row.dart';
@ -31,7 +32,7 @@ class OverlayFooter extends StatelessWidget {
clipBehavior: Clip.hardEdge,
color: Theme.of(context).colorScheme.surfaceContainerHighest,
borderRadius: const BorderRadius.all(
Radius.circular(24),
Radius.circular(AppConfig.borderRadius),
),
child: ChatInputRow(controller),
),

View file

@ -1,3 +1,4 @@
import 'package:fluffychat/config/app_config.dart';
import 'package:fluffychat/pages/chat/chat.dart';
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
@ -14,63 +15,73 @@ class OverlayHeader extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Column(
mainAxisSize: MainAxisSize.min,
children: [
AppBar(
actionsIconTheme: IconThemeData(
return Container(
padding: const EdgeInsets.symmetric(horizontal: 20),
decoration: BoxDecoration(
borderRadius: const BorderRadius.only(
bottomLeft: Radius.circular(AppConfig.borderRadius),
bottomRight: Radius.circular(AppConfig.borderRadius),
),
color: Theme.of(context).appBarTheme.backgroundColor,
),
height: Theme.of(context).appBarTheme.toolbarHeight ?? 56,
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
IconButton(
icon: const Icon(Symbols.forward),
tooltip: L10n.of(context)!.forward,
onPressed: controller.forwardEventsAction,
color: Theme.of(context).colorScheme.primary,
),
actions: [
if (controller.selectedEvents.length == 1 &&
controller.selectedEvents.single.messageType == MessageTypes.Text)
IconButton(
icon: const Icon(Symbols.forward),
tooltip: L10n.of(context)!.forward,
onPressed: controller.forwardEventsAction,
icon: const Icon(Icons.copy_outlined),
tooltip: L10n.of(context)!.copy,
onPressed: controller.copyEventsAction,
color: Theme.of(context).colorScheme.primary,
),
if (controller.selectedEvents.length == 1 &&
controller.selectedEvents.single.messageType ==
MessageTypes.Text)
IconButton(
icon: const Icon(Icons.copy_outlined),
tooltip: L10n.of(context)!.copy,
onPressed: controller.copyEventsAction,
),
if (controller.canPinSelectedEvents)
IconButton(
icon: const Icon(Icons.push_pin_outlined),
onPressed: controller.pinEvent,
tooltip: L10n.of(context)!.pinMessage,
),
if (controller.canEditSelectedEvents)
IconButton(
icon: const Icon(Icons.edit_outlined),
tooltip: L10n.of(context)!.edit,
onPressed: controller.editSelectedEventAction,
),
if (controller.canRedactSelectedEvents)
IconButton(
icon: const Icon(Icons.delete_outlined),
tooltip: L10n.of(context)!.redactMessage,
onPressed: controller.redactEventsAction,
),
if (controller.selectedEvents.length == 1)
IconButton(
icon: const Icon(Icons.shield_outlined),
tooltip: L10n.of(context)!.reportMessage,
onPressed: controller.reportEventAction,
),
if (controller.selectedEvents.length == 1)
IconButton(
icon: const Icon(Icons.info_outlined),
tooltip: L10n.of(context)!.messageInfo,
onPressed: () {
controller.showEventInfo();
controller.clearSelectedEvents();
},
),
],
),
],
if (controller.canPinSelectedEvents)
IconButton(
icon: const Icon(Icons.push_pin_outlined),
onPressed: controller.pinEvent,
tooltip: L10n.of(context)!.pinMessage,
color: Theme.of(context).colorScheme.primary,
),
if (controller.canEditSelectedEvents)
IconButton(
icon: const Icon(Icons.edit_outlined),
tooltip: L10n.of(context)!.edit,
onPressed: controller.editSelectedEventAction,
color: Theme.of(context).colorScheme.primary,
),
if (controller.canRedactSelectedEvents)
IconButton(
icon: const Icon(Icons.delete_outlined),
tooltip: L10n.of(context)!.redactMessage,
onPressed: controller.redactEventsAction,
color: Theme.of(context).colorScheme.primary,
),
if (controller.selectedEvents.length == 1)
IconButton(
icon: const Icon(Icons.shield_outlined),
tooltip: L10n.of(context)!.reportMessage,
onPressed: controller.reportEventAction,
color: Theme.of(context).colorScheme.primary,
),
if (controller.selectedEvents.length == 1)
IconButton(
icon: const Icon(Icons.info_outlined),
tooltip: L10n.of(context)!.messageInfo,
color: Theme.of(context).colorScheme.primary,
onPressed: () {
controller.showEventInfo();
controller.clearSelectedEvents();
},
),
],
),
);
}
}

View file

@ -122,6 +122,7 @@ class MultipleChoiceActivityState extends State<MultipleChoiceActivity> {
final content = Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
practiceActivity.content.question,