chore: Adjust design

This commit is contained in:
Krille Fear 2021-11-13 19:22:11 +01:00
parent bc41ff3e36
commit 9425aab475
6 changed files with 15 additions and 14 deletions

View File

@ -41,6 +41,7 @@ abstract class FluffyThemes {
primary: AppConfig.chatColor, primary: AppConfig.chatColor,
secondary: AppConfig.chatColor, secondary: AppConfig.chatColor,
secondaryVariant: AppConfig.secondaryColor, secondaryVariant: AppConfig.secondaryColor,
surface: FluffyThemes.lighten(AppConfig.chatColor, 0.51),
), ),
backgroundColor: Colors.white, backgroundColor: Colors.white,
secondaryHeaderColor: Colors.blueGrey.shade50, secondaryHeaderColor: Colors.blueGrey.shade50,
@ -131,6 +132,7 @@ abstract class FluffyThemes {
primary: AppConfig.primaryColorLight, primary: AppConfig.primaryColorLight,
secondary: AppConfig.primaryColorLight, secondary: AppConfig.primaryColorLight,
secondaryVariant: AppConfig.secondaryColor, secondaryVariant: AppConfig.secondaryColor,
surface: FluffyThemes.darken(AppConfig.chatColor, 0.4),
), ),
secondaryHeaderColor: Colors.blueGrey.shade900, secondaryHeaderColor: Colors.blueGrey.shade900,
textTheme: Typography.material2018().white.merge(fallbackTextTheme), textTheme: Typography.material2018().white.merge(fallbackTextTheme),

View File

@ -233,9 +233,7 @@ class ChatView extends StatelessWidget {
), ),
) )
: null, : null,
backgroundColor: Theme.of(context).brightness == Brightness.light backgroundColor: Theme.of(context).colorScheme.surface,
? FluffyThemes.lighten(Theme.of(context).primaryColor, 0.51)
: FluffyThemes.darken(Theme.of(context).primaryColor, 0.35),
body: Stack( body: Stack(
children: <Widget>[ children: <Widget>[
if (Matrix.of(context).wallpaper != null) if (Matrix.of(context).wallpaper != null)

View File

@ -251,7 +251,7 @@ class Message extends StatelessWidget {
padding: const EdgeInsets.all(6.0), padding: const EdgeInsets.all(6.0),
child: Text( child: Text(
event.originServerTs.localizedTime(context), event.originServerTs.localizedTime(context),
style: const TextStyle(fontSize: 12), style: TextStyle(fontSize: 14 * AppConfig.fontSizeFactor),
), ),
), ),
)), )),

View File

@ -99,9 +99,6 @@ class _Reaction extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final borderColor = reacted
? Theme.of(context).primaryColor
: Theme.of(context).dividerColor;
final textColor = Theme.of(context).brightness == Brightness.dark final textColor = Theme.of(context).brightness == Brightness.dark
? Colors.white ? Colors.white
: Colors.black; : Colors.black;
@ -148,10 +145,12 @@ class _Reaction extends StatelessWidget {
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: color, color: color,
border: Border.all( border: reacted
width: 1, ? Border.all(
color: borderColor, width: 1,
), color: Theme.of(context).primaryColor,
)
: null,
borderRadius: BorderRadius.circular(AppConfig.borderRadius), borderRadius: BorderRadius.circular(AppConfig.borderRadius),
), ),
padding: const EdgeInsets.symmetric(horizontal: 5, vertical: 3), padding: const EdgeInsets.symmetric(horizontal: 5, vertical: 3),

View File

@ -41,7 +41,7 @@ class StateMessage extends StatelessWidget {
event.getLocalizedBody(MatrixLocals(L10n.of(context))), event.getLocalizedBody(MatrixLocals(L10n.of(context))),
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
fontSize: Theme.of(context).textTheme.bodyText1.fontSize, fontSize: 14 * AppConfig.fontSizeFactor,
color: Theme.of(context).textTheme.bodyText2.color, color: Theme.of(context).textTheme.bodyText2.color,
decoration: decoration:
event.redacted ? TextDecoration.lineThrough : null, event.redacted ? TextDecoration.lineThrough : null,
@ -50,8 +50,9 @@ class StateMessage extends StatelessWidget {
if (counter != 0) if (counter != 0)
Text( Text(
L10n.of(context).moreEvents(counter), L10n.of(context).moreEvents(counter),
style: const TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 14 * AppConfig.fontSizeFactor,
), ),
), ),
], ],

View File

@ -14,8 +14,9 @@ class EmptyPage extends StatelessWidget {
appBar: AppBar( appBar: AppBar(
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
elevation: 0, elevation: 0,
backgroundColor: Theme.of(context).scaffoldBackgroundColor, backgroundColor: Theme.of(context).colorScheme.surface,
), ),
backgroundColor: Theme.of(context).colorScheme.surface,
extendBodyBehindAppBar: true, extendBodyBehindAppBar: true,
body: Column( body: Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,