🐛 Fix attachment editor title overflow

This commit is contained in:
LittleSheep 2024-08-04 12:23:39 +08:00
parent a5f093e185
commit 0a7ccaeefa
2 changed files with 14 additions and 6 deletions

View File

@ -100,7 +100,7 @@ class SolianApp extends StatelessWidget {
routeInformationProvider: AppRouter.instance.routeInformationProvider, routeInformationProvider: AppRouter.instance.routeInformationProvider,
backButtonDispatcher: AppRouter.instance.backButtonDispatcher, backButtonDispatcher: AppRouter.instance.backButtonDispatcher,
translations: SolianMessages(), translations: SolianMessages(),
locale: Get.deviceLocale, locale: const Locale('en', 'US'),
fallbackLocale: const Locale('en', 'US'), fallbackLocale: const Locale('en', 'US'),
onInit: () => _initializeProviders(context), onInit: () => _initializeProviders(context),
builder: (context, child) { builder: (context, child) {

View File

@ -385,7 +385,9 @@ class _AttachmentEditorPopupState extends State<AttachmentEditorPopup> {
icon: const Icon(Icons.warning), icon: const Icon(Icons.warning),
onPressed: () {}, onPressed: () {},
), ),
if (!element.isCompleted && element.error == null && canBeCrop) if (!element.isCompleted &&
element.error == null &&
canBeCrop)
Obx( Obx(
() => IconButton( () => IconButton(
color: Colors.teal, color: Colors.teal,
@ -398,7 +400,9 @@ class _AttachmentEditorPopupState extends State<AttachmentEditorPopup> {
}, },
), ),
), ),
if (!element.isCompleted && !element.isUploading && element.error == null) if (!element.isCompleted &&
!element.isUploading &&
element.error == null)
Obx( Obx(
() => IconButton( () => IconButton(
color: Colors.green, color: Colors.green,
@ -592,9 +596,13 @@ class _AttachmentEditorPopupState extends State<AttachmentEditorPopup> {
child: Row( child: Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
Text( Expanded(
'attachmentAdd'.tr, child: Text(
style: Theme.of(context).textTheme.headlineSmall, 'attachmentAdd'.tr,
style: Theme.of(context).textTheme.headlineSmall,
maxLines: 2,
overflow: TextOverflow.fade,
),
), ),
const SizedBox(width: 10), const SizedBox(width: 10),
Obx(() { Obx(() {