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(
color: Theme.of(context).scaffoldBackgroundColor,
child: SafeArea(
@ -95,7 +97,10 @@ class EditorBottomBar extends StatelessWidget {
),
TextButton.icon(
icon: const Icon(Icons.folder),
label: Text(parentFolder.publicName),
label: Text(
parentFolder.publicName,
style: theme.textTheme.bodyText2,
),
onPressed: () {
var note = editorState.getNote();
editor.moveNoteToFolderSelected(note);

View File

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

View File

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

View File

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

View File

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

View File

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