mirror of
				https://gitlab.com/famedly/fluffychat.git
				synced 2025-10-31 03:57:27 +01:00 
			
		
		
		
	chore: Adjust colors
This commit is contained in:
		
							parent
							
								
									b587827589
								
							
						
					
					
						commit
						97e644b64a
					
				| @ -75,6 +75,8 @@ class MessageContent extends StatelessWidget { | ||||
|   @override | ||||
|   Widget build(BuildContext context) { | ||||
|     final fontSize = AppConfig.messageFontSize * AppConfig.fontSizeFactor; | ||||
|     final buttonTextColor = | ||||
|         event.senderId == Matrix.of(context).client.userID ? textColor : null; | ||||
|     switch (event.type) { | ||||
|       case EventTypes.Message: | ||||
|       case EventTypes.Encrypted: | ||||
| @ -165,7 +167,7 @@ class MessageContent extends StatelessWidget { | ||||
|           case MessageTypes.BadEncrypted: | ||||
|           case EventTypes.Encrypted: | ||||
|             return _ButtonContent( | ||||
|               textColor: textColor, | ||||
|               textColor: buttonTextColor, | ||||
|               onPressed: () => _verifyOrRequestKey(context), | ||||
|               icon: const Icon(Icons.lock_outline), | ||||
|               label: L10n.of(context).encrypted, | ||||
| @ -215,7 +217,7 @@ class MessageContent extends StatelessWidget { | ||||
|                 onPressed: () => launch(event.body), | ||||
|                 icon: const Icon(Icons.phone_outlined, color: Colors.green), | ||||
|                 label: L10n.of(context).videoCall, | ||||
|                 textColor: textColor, | ||||
|                 textColor: buttonTextColor, | ||||
|               ); | ||||
|             } | ||||
|             if (event.redacted) { | ||||
| @ -223,7 +225,7 @@ class MessageContent extends StatelessWidget { | ||||
|                 label: L10n.of(context) | ||||
|                     .redactedAnEvent(event.sender.calcDisplayname()), | ||||
|                 icon: const Icon(Icons.delete_outlined), | ||||
|                 textColor: textColor, | ||||
|                 textColor: buttonTextColor, | ||||
|                 onPressed: () => onInfoTab(event), | ||||
|               ); | ||||
|             } | ||||
| @ -252,7 +254,7 @@ class MessageContent extends StatelessWidget { | ||||
|           label: L10n.of(context) | ||||
|               .userSentUnknownEvent(event.sender.calcDisplayname(), event.type), | ||||
|           icon: const Icon(Icons.info_outlined), | ||||
|           textColor: textColor, | ||||
|           textColor: buttonTextColor, | ||||
|           onPressed: () => onInfoTab(event), | ||||
|         ); | ||||
|     } | ||||
| @ -280,6 +282,7 @@ class _ButtonContent extends StatelessWidget { | ||||
|       onPressed: onPressed, | ||||
|       icon: icon, | ||||
|       label: Text(label, overflow: TextOverflow.ellipsis), | ||||
|       style: TextButton.styleFrom(primary: textColor), | ||||
|     ); | ||||
|   } | ||||
| } | ||||
|  | ||||
| @ -3,6 +3,7 @@ import 'package:flutter/material.dart'; | ||||
| import 'package:matrix/matrix.dart'; | ||||
| 
 | ||||
| import 'package:fluffychat/utils/matrix_sdk_extensions.dart/event_extension.dart'; | ||||
| import 'package:fluffychat/widgets/matrix.dart'; | ||||
| 
 | ||||
| class MessageDownloadContent extends StatelessWidget { | ||||
|   final Event event; | ||||
| @ -24,6 +25,9 @@ class MessageDownloadContent extends StatelessWidget { | ||||
|           onPressed: () => event.saveFile(context), | ||||
|           icon: const Icon(Icons.download_outlined), | ||||
|           label: Text(filename), | ||||
|           style: event.senderId == Matrix.of(context).client.userID | ||||
|               ? TextButton.styleFrom(primary: textColor) | ||||
|               : null, | ||||
|         ), | ||||
|         if (event.sizeString != null) | ||||
|           Text( | ||||
|  | ||||
| @ -51,13 +51,14 @@ class SettingsStyleController extends State<SettingsStyle> { | ||||
| 
 | ||||
|   AdaptiveThemeMode currentTheme; | ||||
| 
 | ||||
|   static List<Color> get customColors => [ | ||||
|         AppConfig.primaryColor, | ||||
|         HSLColor.fromColor(AppConfig.primaryColor).withHue(200).toColor(), | ||||
|         HSLColor.fromColor(AppConfig.primaryColor).withHue(130).toColor(), | ||||
|         HSLColor.fromColor(AppConfig.primaryColor).withHue(65).toColor(), | ||||
|         HSLColor.fromColor(AppConfig.primaryColor).withHue(8).toColor(), | ||||
|       ]; | ||||
|   static final List<Color> customColors = [ | ||||
|     AppConfig.primaryColor, | ||||
|     Colors.blue.shade800, | ||||
|     Colors.green.shade800, | ||||
|     Colors.orange.shade900, | ||||
|     Colors.pink.shade700, | ||||
|     Colors.blueGrey.shade600, | ||||
|   ]; | ||||
| 
 | ||||
|   void switchTheme(AdaptiveThemeMode newTheme) { | ||||
|     switch (newTheme) { | ||||
|  | ||||
| @ -14,9 +14,8 @@ class EmptyPage extends StatelessWidget { | ||||
|       appBar: AppBar( | ||||
|         automaticallyImplyLeading: false, | ||||
|         elevation: 0, | ||||
|         backgroundColor: Theme.of(context).colorScheme.surface, | ||||
|         backgroundColor: Theme.of(context).scaffoldBackgroundColor, | ||||
|       ), | ||||
|       backgroundColor: Theme.of(context).colorScheme.surface, | ||||
|       extendBodyBehindAppBar: true, | ||||
|       body: Column( | ||||
|         mainAxisAlignment: MainAxisAlignment.center, | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Krille Fear
						Krille Fear