Fix text appearance on download page.

This commit is contained in:
Mark Johnson 2024-06-13 15:59:08 +01:00
parent 3d89d73af1
commit 920b8488c7
No known key found for this signature in database
GPG Key ID: EB30E1468CFAE242
1 changed files with 25 additions and 19 deletions

View File

@ -1,7 +1,6 @@
import 'dart:io';
import 'package:file_picker/file_picker.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:gettext_i18n/gettext_i18n.dart';
@ -9,6 +8,7 @@ import '../../globals.dart';
import '../../mixins/preferences_mixin.dart';
import '../home_page/home_page_button_group.dart';
class DownloaderMenu extends StatefulWidget {
const DownloaderMenu({Key? key}) : super(key: key);
@ -43,14 +43,23 @@ class _DownloaderMenuState extends State<DownloaderMenu> with PreferencesMixin {
children: [
Text(
"${context.t('Directory where the machines are stored')}:",
style: TextStyle(
color: Theme.of(context).brightness == Brightness.dark
? Theme.of(context).colorScheme.onSurface
: Theme.of(context).colorScheme.onPrimary,
),
),
const SizedBox(
width: 8,
),
Text.rich(
TextSpan(
recognizer: TapGestureRecognizer()
..onTap = () async {
ElevatedButton(
style: ElevatedButton.styleFrom(
foregroundColor: Theme.of(context).brightness == Brightness.dark
? Colors.white70
: Theme.of(context).colorScheme.primary,
backgroundColor: Theme.of(context).canvasColor,
),
onPressed: () async {
var folder = await FilePicker.platform
.getDirectoryPath(dialogTitle: "Pick a folder");
if (folder != null) {
@ -61,10 +70,7 @@ class _DownloaderMenuState extends State<DownloaderMenu> with PreferencesMixin {
prefWorkingDirectory, Directory.current.path);
}
},
text: Directory.current.path,
style: TextStyle(
color: Theme.of(context).colorScheme.primary),
),
child: Text(Directory.current.path),
),
],
),