Markdown DarkTheme: Make the checkboxes lighter

This entire way of styling the markdown badly needs to be re-done from
scratch.
This commit is contained in:
Vishesh Handa
2020-09-23 02:18:47 +02:00
parent 3e785cbc97
commit f3715bd3c8
2 changed files with 9 additions and 1 deletions

View File

@ -1,6 +1,10 @@
- version: "1.71"
draft: true
bugs:
- text: "Dark Theme: Render checkboxes in a lighter color"
- version: "1.70" - version: "1.70"
date: 2020-09-16 date: 2020-09-16
draft: false
reddit: "https://www.reddit.com/r/GitJournal/comments/iu47ej/gitjournal_v170/" reddit: "https://www.reddit.com/r/GitJournal/comments/iu47ej/gitjournal_v170/"
features: features:
- text: "Implement Basic Search highlighting #14" - text: "Implement Basic Search highlighting #14"

View File

@ -42,6 +42,7 @@ class NoteViewer extends StatelessWidget {
); );
var settings = Provider.of<Settings>(context); var settings = Provider.of<Settings>(context);
var isDark = theme.brightness == Brightness.dark;
// Copied from MarkdownStyleSheet except Grey is replaced with Highlight color // Copied from MarkdownStyleSheet except Grey is replaced with Highlight color
var markdownStyleSheet = MarkdownStyleSheet.fromTheme(theme).copyWith( var markdownStyleSheet = MarkdownStyleSheet.fromTheme(theme).copyWith(
@ -65,6 +66,9 @@ class NoteViewer extends StatelessWidget {
color: theme.primaryColorLight, color: theme.primaryColorLight,
borderRadius: BorderRadius.circular(2.0), borderRadius: BorderRadius.circular(2.0),
), ),
checkbox: theme.textTheme.bodyText2.copyWith(
color: isDark ? theme.primaryColorLight : theme.primaryColor,
),
); );
final rootFolder = Provider.of<NotesFolderFS>(context); final rootFolder = Provider.of<NotesFolderFS>(context);