fix: Darktheme contrast fixes with primary color

This commit is contained in:
krille-chan 2023-12-26 14:02:07 +01:00
parent a5a1c9b580
commit 89540ec7ef
No known key found for this signature in database
9 changed files with 16 additions and 13 deletions

View file

@ -273,7 +273,7 @@ class BootstrapDialogState extends State<BootstrapDialog> {
style: ElevatedButton.styleFrom( style: ElevatedButton.styleFrom(
foregroundColor: foregroundColor:
Theme.of(context).colorScheme.onPrimary, Theme.of(context).colorScheme.onPrimary,
backgroundColor: Theme.of(context).primaryColor, backgroundColor: Theme.of(context).colorScheme.primary,
), ),
icon: _recoveryKeyInputLoading icon: _recoveryKeyInputLoading
? const CircularProgressIndicator.adaptive() ? const CircularProgressIndicator.adaptive()

View file

@ -391,8 +391,8 @@ class Message extends StatelessWidget {
children: [ children: [
Container( Container(
color: selected color: selected
? Theme.of(context).primaryColor.withAlpha(100) ? Theme.of(context).colorScheme.primary.withAlpha(100)
: Theme.of(context).primaryColor.withAlpha(0), : Colors.transparent,
constraints: const BoxConstraints( constraints: const BoxConstraints(
maxWidth: FluffyThemes.columnWidth * 2.5, maxWidth: FluffyThemes.columnWidth * 2.5,
), ),
@ -410,7 +410,7 @@ class Message extends StatelessWidget {
child: Material( child: Material(
color: Theme.of(context) color: Theme.of(context)
.colorScheme .colorScheme
.background .surfaceVariant
.withOpacity(0.9), .withOpacity(0.9),
elevation: Theme.of(context) elevation: Theme.of(context)
.appBarTheme .appBarTheme

View file

@ -154,7 +154,7 @@ class _Reaction extends StatelessWidget {
border: reacted! border: reacted!
? Border.all( ? Border.all(
width: 1, width: 1,
color: Theme.of(context).primaryColor, color: Theme.of(context).colorScheme.primary,
) )
: null, : null,
borderRadius: BorderRadius.circular(AppConfig.borderRadius), borderRadius: BorderRadius.circular(AppConfig.borderRadius),

View file

@ -64,7 +64,7 @@ class _EditContent extends StatelessWidget {
children: <Widget>[ children: <Widget>[
Icon( Icon(
Icons.edit, Icons.edit,
color: Theme.of(context).primaryColor, color: Theme.of(context).colorScheme.primary,
), ),
Container(width: 15.0), Container(width: 15.0),
FutureBuilder<String>( FutureBuilder<String>(

View file

@ -399,7 +399,8 @@ class ChatDetailsView extends StatelessWidget {
ListTile( ListTile(
title: Text(L10n.of(context)!.inviteContact), title: Text(L10n.of(context)!.inviteContact),
leading: CircleAvatar( leading: CircleAvatar(
backgroundColor: Theme.of(context).primaryColor, backgroundColor:
Theme.of(context).colorScheme.primary,
foregroundColor: Colors.white, foregroundColor: Colors.white,
radius: Avatar.defaultSize / 2, radius: Avatar.defaultSize / 2,
child: const Icon(Icons.add_outlined), child: const Icon(Icons.add_outlined),

View file

@ -186,7 +186,7 @@ class ChatListItem extends StatelessWidget {
width: Avatar.defaultSize, width: Avatar.defaultSize,
height: Avatar.defaultSize, height: Avatar.defaultSize,
child: Material( child: Material(
color: Theme.of(context).primaryColor, color: Theme.of(context).colorScheme.primary,
borderRadius: BorderRadius.circular(Avatar.defaultSize), borderRadius: BorderRadius.circular(Avatar.defaultSize),
child: const Icon(Icons.check, color: Colors.white), child: const Icon(Icons.check, color: Colors.white),
), ),

View file

@ -59,7 +59,7 @@ class ChatPermissionsSettingsView extends StatelessWidget {
title: Text( title: Text(
L10n.of(context)!.notifications, L10n.of(context)!.notifications,
style: TextStyle( style: TextStyle(
color: Theme.of(context).primaryColor, color: Theme.of(context).colorScheme.primary,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
), ),
@ -89,7 +89,7 @@ class ChatPermissionsSettingsView extends StatelessWidget {
title: Text( title: Text(
L10n.of(context)!.configureChat, L10n.of(context)!.configureChat,
style: TextStyle( style: TextStyle(
color: Theme.of(context).primaryColor, color: Theme.of(context).colorScheme.primary,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
), ),

View file

@ -139,8 +139,10 @@ class KeyVerificationPageState extends State<KeyVerificationDialog> {
obscureText: true, obscureText: true,
decoration: InputDecoration( decoration: InputDecoration(
hintText: L10n.of(context)!.passphraseOrKey, hintText: L10n.of(context)!.passphraseOrKey,
prefixStyle: TextStyle(color: Theme.of(context).primaryColor), prefixStyle:
suffixStyle: TextStyle(color: Theme.of(context).primaryColor), TextStyle(color: Theme.of(context).colorScheme.primary),
suffixStyle:
TextStyle(color: Theme.of(context).colorScheme.primary),
border: const OutlineInputBorder(), border: const OutlineInputBorder(),
), ),
), ),

View file

@ -45,7 +45,7 @@ class QrScannerModalState extends State<QrScannerModal> {
key: qrKey, key: qrKey,
onQRViewCreated: _onQRViewCreated, onQRViewCreated: _onQRViewCreated,
overlay: QrScannerOverlayShape( overlay: QrScannerOverlayShape(
borderColor: Theme.of(context).primaryColor, borderColor: Theme.of(context).colorScheme.primary,
borderRadius: 10, borderRadius: 10,
borderLength: 30, borderLength: 30,
borderWidth: 8, borderWidth: 8,