more text selection and menu bg settings on other message bubbles
continuous-integration/drone/push Build was killed
Details
continuous-integration/drone/push Build was killed
Details
This commit is contained in:
parent
8d1d9ded5e
commit
48dda98f25
|
@ -238,25 +238,37 @@ class FileBubbleState extends State<FileBubble> {
|
||||||
bottomRight: fromMe ? Radius.zero : Radius.circular(borderRadius),
|
bottomRight: fromMe ? Radius.zero : Radius.circular(borderRadius),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: Padding(
|
child: Theme(
|
||||||
padding: EdgeInsets.all(9.0),
|
data: Theme.of(context).copyWith(
|
||||||
child: Column(
|
textSelectionTheme: TextSelectionThemeData(
|
||||||
crossAxisAlignment: fromMe ? CrossAxisAlignment.end : CrossAxisAlignment.start,
|
cursorColor: Provider.of<Settings>(context).theme.messageSelectionColor,
|
||||||
mainAxisAlignment: fromMe ? MainAxisAlignment.end : MainAxisAlignment.start,
|
selectionColor: Provider.of<Settings>(context).theme.messageSelectionColor,
|
||||||
mainAxisSize: MainAxisSize.min,
|
selectionHandleColor: Provider.of<Settings>(context).theme.messageSelectionColor),
|
||||||
children: [
|
|
||||||
wdgSender,
|
// Horrifying Hack: Flutter doesn't give us direct control over system menus but instead picks BG color from TextButtonThemeData ¯\_(ツ)_/¯
|
||||||
isPreview
|
textButtonTheme: TextButtonThemeData(
|
||||||
? Container(
|
style: ButtonStyle(backgroundColor: MaterialStateProperty.all(Provider.of<Settings>(context).theme.menuBackgroundColor)),
|
||||||
width: 0,
|
),
|
||||||
padding: EdgeInsets.zero,
|
),
|
||||||
margin: EdgeInsets.zero,
|
child: Padding(
|
||||||
)
|
padding: EdgeInsets.all(9.0),
|
||||||
: wdgMessage,
|
child: Column(
|
||||||
wdgDecorations,
|
crossAxisAlignment: fromMe ? CrossAxisAlignment.end : CrossAxisAlignment.start,
|
||||||
messageStatusWidget
|
mainAxisAlignment: fromMe ? MainAxisAlignment.end : MainAxisAlignment.start,
|
||||||
]),
|
mainAxisSize: MainAxisSize.min,
|
||||||
));
|
children: [
|
||||||
|
wdgSender,
|
||||||
|
isPreview
|
||||||
|
? Container(
|
||||||
|
width: 0,
|
||||||
|
padding: EdgeInsets.zero,
|
||||||
|
margin: EdgeInsets.zero,
|
||||||
|
)
|
||||||
|
: wdgMessage,
|
||||||
|
wdgDecorations,
|
||||||
|
messageStatusWidget
|
||||||
|
]),
|
||||||
|
)));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -100,33 +100,47 @@ class InvitationBubbleState extends State<InvitationBubble> {
|
||||||
//print(constraints.toString()+", "+constraints.maxWidth.toString());
|
//print(constraints.toString()+", "+constraints.maxWidth.toString());
|
||||||
return Center(
|
return Center(
|
||||||
widthFactor: 1.0,
|
widthFactor: 1.0,
|
||||||
child: Container(
|
child: Theme(
|
||||||
decoration: BoxDecoration(
|
data: Theme.of(context).copyWith(
|
||||||
color: fromMe ? Provider.of<Settings>(context).theme.messageFromMeBackgroundColor : Provider.of<Settings>(context).theme.messageFromOtherBackgroundColor,
|
textSelectionTheme: TextSelectionThemeData(
|
||||||
border: Border.all(color: fromMe ? Provider.of<Settings>(context).theme.messageFromMeBackgroundColor : Provider.of<Settings>(context).theme.messageFromOtherBackgroundColor, width: 1),
|
cursorColor: Provider.of<Settings>(context).theme.messageSelectionColor,
|
||||||
borderRadius: BorderRadius.only(
|
selectionColor: Provider.of<Settings>(context).theme.messageSelectionColor,
|
||||||
topLeft: Radius.circular(borderRadiousEh),
|
selectionHandleColor: Provider.of<Settings>(context).theme.messageSelectionColor),
|
||||||
topRight: Radius.circular(borderRadiousEh),
|
|
||||||
bottomLeft: fromMe ? Radius.circular(borderRadiousEh) : Radius.zero,
|
// Horrifying Hack: Flutter doesn't give us direct control over system menus but instead picks BG color from TextButtonThemeData ¯\_(ツ)_/¯
|
||||||
bottomRight: fromMe ? Radius.zero : Radius.circular(borderRadiousEh),
|
textButtonTheme: TextButtonThemeData(
|
||||||
|
style: ButtonStyle(backgroundColor: MaterialStateProperty.all(Provider.of<Settings>(context).theme.menuBackgroundColor)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: Center(
|
child: Container(
|
||||||
widthFactor: 1.0,
|
decoration: BoxDecoration(
|
||||||
child: Padding(
|
color: fromMe ? Provider.of<Settings>(context).theme.messageFromMeBackgroundColor : Provider.of<Settings>(context).theme.messageFromOtherBackgroundColor,
|
||||||
padding: EdgeInsets.all(9.0),
|
border:
|
||||||
child: Wrap(runAlignment: WrapAlignment.spaceEvenly, alignment: WrapAlignment.spaceEvenly, runSpacing: 1.0, crossAxisAlignment: WrapCrossAlignment.center, children: [
|
Border.all(color: fromMe ? Provider.of<Settings>(context).theme.messageFromMeBackgroundColor : Provider.of<Settings>(context).theme.messageFromOtherBackgroundColor, width: 1),
|
||||||
Center(
|
borderRadius: BorderRadius.only(
|
||||||
widthFactor: 1, child: Padding(padding: EdgeInsets.all(10.0), child: Icon(isGroup && !showGroupInvite ? CwtchIcons.enable_experiments : CwtchIcons.send_invite, size: 32))),
|
topLeft: Radius.circular(borderRadiousEh),
|
||||||
Center(
|
topRight: Radius.circular(borderRadiousEh),
|
||||||
widthFactor: 1.0,
|
bottomLeft: fromMe ? Radius.circular(borderRadiousEh) : Radius.zero,
|
||||||
child: Column(
|
bottomRight: fromMe ? Radius.zero : Radius.circular(borderRadiousEh),
|
||||||
crossAxisAlignment: fromMe ? CrossAxisAlignment.end : CrossAxisAlignment.start,
|
),
|
||||||
mainAxisAlignment: fromMe ? MainAxisAlignment.end : MainAxisAlignment.start,
|
),
|
||||||
mainAxisSize: MainAxisSize.min,
|
child: Center(
|
||||||
children: fromMe ? [wdgMessage, wdgDecorations] : [wdgSender, wdgMessage, wdgDecorations]),
|
widthFactor: 1.0,
|
||||||
)
|
child: Padding(
|
||||||
])))));
|
padding: EdgeInsets.all(9.0),
|
||||||
|
child: Wrap(runAlignment: WrapAlignment.spaceEvenly, alignment: WrapAlignment.spaceEvenly, runSpacing: 1.0, crossAxisAlignment: WrapCrossAlignment.center, children: [
|
||||||
|
Center(
|
||||||
|
widthFactor: 1,
|
||||||
|
child: Padding(padding: EdgeInsets.all(10.0), child: Icon(isGroup && !showGroupInvite ? CwtchIcons.enable_experiments : CwtchIcons.send_invite, size: 32))),
|
||||||
|
Center(
|
||||||
|
widthFactor: 1.0,
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: fromMe ? CrossAxisAlignment.end : CrossAxisAlignment.start,
|
||||||
|
mainAxisAlignment: fromMe ? MainAxisAlignment.end : MainAxisAlignment.start,
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: fromMe ? [wdgMessage, wdgDecorations] : [wdgSender, wdgMessage, wdgDecorations]),
|
||||||
|
)
|
||||||
|
]))))));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -143,11 +143,23 @@ class QuotedMessageBubbleState extends State<QuotedMessageBubble> {
|
||||||
),
|
),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.all(9.0),
|
padding: EdgeInsets.all(9.0),
|
||||||
child: Column(
|
child: Theme(
|
||||||
crossAxisAlignment: fromMe ? CrossAxisAlignment.end : CrossAxisAlignment.start,
|
data: Theme.of(context).copyWith(
|
||||||
mainAxisAlignment: fromMe ? MainAxisAlignment.end : MainAxisAlignment.start,
|
textSelectionTheme: TextSelectionThemeData(
|
||||||
mainAxisSize: MainAxisSize.min,
|
cursorColor: Provider.of<Settings>(context).theme.messageSelectionColor,
|
||||||
children: fromMe ? [wdgQuote, wdgMessage, wdgDecorations] : [wdgSender, wdgQuote, wdgMessage, wdgDecorations])))));
|
selectionColor: Provider.of<Settings>(context).theme.messageSelectionColor,
|
||||||
|
selectionHandleColor: Provider.of<Settings>(context).theme.messageSelectionColor),
|
||||||
|
|
||||||
|
// Horrifying Hack: Flutter doesn't give us direct control over system menus but instead picks BG color from TextButtonThemeData ¯\_(ツ)_/¯
|
||||||
|
textButtonTheme: TextButtonThemeData(
|
||||||
|
style: ButtonStyle(backgroundColor: MaterialStateProperty.all(Provider.of<Settings>(context).theme.menuBackgroundColor)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: fromMe ? CrossAxisAlignment.end : CrossAxisAlignment.start,
|
||||||
|
mainAxisAlignment: fromMe ? MainAxisAlignment.end : MainAxisAlignment.start,
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: fromMe ? [wdgQuote, wdgMessage, wdgDecorations] : [wdgSender, wdgQuote, wdgMessage, wdgDecorations]))))));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue