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(
foregroundColor:
Theme.of(context).colorScheme.onPrimary,
backgroundColor: Theme.of(context).primaryColor,
backgroundColor: Theme.of(context).colorScheme.primary,
),
icon: _recoveryKeyInputLoading
? const CircularProgressIndicator.adaptive()

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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