Improve dark mode

This probably isn't the right way to go about it. It would be better to
change the theme instead of overwriting stuff.
This commit is contained in:
Vishesh Handa
2021-07-01 13:24:41 +02:00
parent b2cbba07b7
commit f55b60e55a
6 changed files with 28 additions and 6 deletions

View File

@ -73,6 +73,8 @@ class EditorBottomBar extends StatelessWidget {
}, },
); );
var theme = Theme.of(context);
return Container( return Container(
color: Theme.of(context).scaffoldBackgroundColor, color: Theme.of(context).scaffoldBackgroundColor,
child: SafeArea( child: SafeArea(
@ -95,7 +97,10 @@ class EditorBottomBar extends StatelessWidget {
), ),
TextButton.icon( TextButton.icon(
icon: const Icon(Icons.folder), icon: const Icon(Icons.folder),
label: Text(parentFolder.publicName), label: Text(
parentFolder.publicName,
style: theme.textTheme.bodyText2,
),
onPressed: () { onPressed: () {
var note = editorState.getNote(); var note = editorState.getNote();
editor.moveNoteToFolderSelected(note); editor.moveNoteToFolderSelected(note);

View File

@ -100,7 +100,10 @@ class _PurchaseScreenState extends State<PurchaseScreen> {
children: [ children: [
RestorePurchaseButton(), RestorePurchaseButton(),
OutlinedButton( OutlinedButton(
child: Text(tr("feature_timeline.title")), child: Text(
tr("feature_timeline.title"),
style: Theme.of(context).textTheme.bodyText2,
),
onPressed: () { onPressed: () {
var route = MaterialPageRoute( var route = MaterialPageRoute(
builder: (context) => FeatureTimelineScreen(), builder: (context) => FeatureTimelineScreen(),

View File

@ -332,7 +332,10 @@ class _RestorePurchaseButtonState extends State<RestorePurchaseButton> {
var text = computing ? '...' : tr('purchase_screen.restore'); var text = computing ? '...' : tr('purchase_screen.restore');
return OutlinedButton( return OutlinedButton(
child: Text(text), child: Text(
text,
style: Theme.of(context).textTheme.bodyText2,
),
onPressed: () async { onPressed: () async {
setState(() { setState(() {
computing = true; computing = true;

View File

@ -93,6 +93,8 @@ class GitJournalRepo with ChangeNotifier {
if (!valid) { if (!valid) {
// What happened that the directory still exists but the .git folder // What happened that the directory still exists but the .git folder
// has disappeared? // has disappeared?
// FIXME: What if the '.config' file is not accessible?
// -> https://sentry.io/share/issue/bafc5c417bdb4fd196cead1d28432f12/
} }
var repo = await GitRepository.load(repoPath).getOrThrow(); var repo = await GitRepository.load(repoPath).getOrThrow();

View File

@ -100,7 +100,10 @@ class KeyEditor extends StatelessWidget {
), ),
), ),
OutlinedButton( OutlinedButton(
child: Text(tr("setup.keyEditors.load")), child: Text(
tr("setup.keyEditors.load"),
style: Theme.of(context).textTheme.bodyText2,
),
onPressed: _pickAndLoadFile, onPressed: _pickAndLoadFile,
), ),
], ],

View File

@ -45,14 +45,20 @@ class _SortingModeSelectorState extends State<SortingModeSelector> {
actions: [ actions: [
OutlinedButton( OutlinedButton(
key: const ValueKey("Cancel"), key: const ValueKey("Cancel"),
child: Text(tr('settings.cancel')), child: Text(
tr('settings.cancel'),
style: Theme.of(context).textTheme.bodyText2,
),
onPressed: () { onPressed: () {
Navigator.of(context).pop(); Navigator.of(context).pop();
}, },
), ),
OutlinedButton( OutlinedButton(
key: const ValueKey("Ok"), key: const ValueKey("Ok"),
child: Text(tr('settings.ok')), child: Text(
tr('settings.ok'),
style: Theme.of(context).textTheme.bodyText2,
),
onPressed: () { onPressed: () {
Navigator.of(context).pop(SortingMode(field, order)); Navigator.of(context).pop(SortingMode(field, order));
}, },