Skip to content

feat(theme): update primary color for improved dark mode contrast #264

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/src/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class _AppState extends State<App> with PreferencesMixin {
darkTheme: ThemeData(
useMaterial3: true,
colorScheme: ColorScheme.fromSwatch(
primarySwatch: darkGrey,
primarySwatch: Colors.pink,
backgroundColor: darkGrey.shade700,
brightness: Brightness.dark,
),
Expand Down
53 changes: 31 additions & 22 deletions lib/src/widgets/left_menu.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,30 +51,36 @@ class _LeftMenuState extends State<LeftMenu> with PreferencesMixin {
children: [
Padding(
// Minimal bottom padding
padding: EdgeInsets.only(bottom: 0).add(EdgeInsets.symmetric(horizontal: 16)),
padding: const EdgeInsets.only(bottom: 0)
.add(const EdgeInsets.symmetric(horizontal: 16)),
child: Container(
padding: EdgeInsets.symmetric(vertical: 4.0),
padding: const EdgeInsets.symmetric(vertical: 4.0),
child: Text("Quickgui $version",
style: const TextStyle(fontSize: 24.0, fontWeight: FontWeight.bold)),
style: const TextStyle(
fontSize: 24.0, fontWeight: FontWeight.bold)),
),
),
FutureBuilder<String>(
future: fetchQuickemuVersion(),
builder: (BuildContext context, AsyncSnapshot<String> snapshot) {
builder:
(BuildContext context, AsyncSnapshot<String> snapshot) {
if (snapshot.connectionState == ConnectionState.waiting) {
return CircularProgressIndicator(); // or some other widget while waiting
return const CircularProgressIndicator(); // or some other widget while waiting
} else {
String poweredByText = context.t('Powered by') + " Quickemu";
String poweredByText =
"${context.t('Powered by')} Quickemu";
if (snapshot.hasData) {
poweredByText += " ${snapshot.data}";
}
return Padding(
// Minimal top padding
padding: EdgeInsets.only(top: 0).add(EdgeInsets.symmetric(horizontal: 16)),
padding: const EdgeInsets.only(top: 0)
.add(const EdgeInsets.symmetric(horizontal: 16)),
child: Container(
child: Text(poweredByText,
style: const TextStyle(fontSize: 12.0, fontWeight: FontWeight.bold)),
),
style: const TextStyle(
fontSize: 12.0, fontWeight: FontWeight.bold)),
),
);
}
},
Expand All @@ -98,21 +104,20 @@ class _LeftMenuState extends State<LeftMenu> with PreferencesMixin {
Switch(
value: Theme.of(context).colorScheme.brightness ==
Brightness.dark,
onChanged: null,
activeColor: Colors.grey[300],
activeTrackColor: Colors.grey[300],
activeColor: Colors.black26,
activeTrackColor: Theme.of(context).colorScheme.primary,
inactiveThumbColor: Colors.grey[500],
inactiveTrackColor: Colors.grey[300],
/*

onChanged: (value) {
appSettings.useDarkMode = value;
savePreference(prefThemeMode, value);
},
activeColor: Colors.white,
activeTrackColor: Colors.black26,
inactiveThumbColor: Theme.of(context).colorScheme.onPrimary,
inactiveTrackColor: Theme.of(context).colorScheme.primary,
*/
// activeColor: Colors.white,
// activeTrackColor: Colors.black26,
// inactiveThumbColor:
// Theme.of(context).colorScheme.onPrimary,
// inactiveTrackColor: Theme.of(context).colorScheme.primary,
),
],
),
Expand Down Expand Up @@ -153,8 +158,10 @@ class _LeftMenuState extends State<LeftMenu> with PreferencesMixin {
textAlign: TextAlign.center,
text: TextSpan(
style: DefaultTextStyle.of(context).style,
children: <TextSpan>[
TextSpan(text: 'Authors\n', style: TextStyle(fontWeight: FontWeight.bold)),
children: const <TextSpan>[
TextSpan(
text: 'Authors\n',
style: TextStyle(fontWeight: FontWeight.bold)),
TextSpan(text: 'Yannick Mauray\n'),
TextSpan(text: 'Mark Johnson\n'),
TextSpan(text: 'Martin Wimpress\n'),
Expand All @@ -165,9 +172,11 @@ class _LeftMenuState extends State<LeftMenu> with PreferencesMixin {
textAlign: TextAlign.center,
text: TextSpan(
style: DefaultTextStyle.of(context).style,
children: <TextSpan>[
children: const <TextSpan>[
TextSpan(text: '© 2021 - 2024\n'),
TextSpan(text: 'Quickemu Project\n', style: TextStyle(fontWeight: FontWeight.bold)),
TextSpan(
text: 'Quickemu Project\n',
style: TextStyle(fontWeight: FontWeight.bold)),
],
),
),
Expand Down