From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH pve-flutter-frontend 04/10] move to OutlinedButton from OutlineButton
Date: Thu, 8 Sep 2022 11:55:44 +0200 [thread overview]
Message-ID: <20220908095550.2913416-8-d.csapak@proxmox.com> (raw)
In-Reply-To: <20220908095550.2913416-1-d.csapak@proxmox.com>
flutter 3.0 removed OutlineButton in favor of OutlinedButton.
also change the default text color to white, and drop an unnecessary
padding in one case
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
lib/main.dart | 10 ++++++++++
.../firstWelcomeScreen/pve_welcome_faq.dart | 8 +++++---
.../firstWelcomeScreen/pve_welcome_last.dart | 18 ++++++++++--------
lib/widgets/pve_cd_selector_widget.dart | 7 ++++---
lib/widgets/pve_guest_backup_widget.dart | 9 ++++-----
lib/widgets/pve_main_navigation_drawer.dart | 4 ++--
.../pve_task_log_expansiontile_widget.dart | 4 ++--
7 files changed, 37 insertions(+), 23 deletions(-)
diff --git a/lib/main.dart b/lib/main.dart
index fca91c6..d467626 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -117,6 +117,11 @@ class MyApp extends StatelessWidget {
textButtonTheme: TextButtonThemeData(
style: TextButton.styleFrom(primary: ProxmoxColors.grey),
),
+ outlinedButtonTheme: OutlinedButtonThemeData(
+ style: OutlinedButton.styleFrom(
+ foregroundColor: Colors.black,
+ ),
+ ),
fontFamily: "Open Sans",
primaryTextTheme: TextTheme(
headline6:
@@ -149,6 +154,11 @@ class MyApp extends StatelessWidget {
textButtonTheme: TextButtonThemeData(
style: TextButton.styleFrom(primary: ProxmoxColors.greyTint80),
),
+ outlinedButtonTheme: OutlinedButtonThemeData(
+ style: OutlinedButton.styleFrom(
+ foregroundColor: Colors.white,
+ ),
+ ),
fontFamily: "Open Sans",
primaryTextTheme: TextTheme(
headline6:
diff --git a/lib/widgets/firstWelcomeScreen/pve_welcome_faq.dart b/lib/widgets/firstWelcomeScreen/pve_welcome_faq.dart
index 2e0e44e..470d118 100644
--- a/lib/widgets/firstWelcomeScreen/pve_welcome_faq.dart
+++ b/lib/widgets/firstWelcomeScreen/pve_welcome_faq.dart
@@ -42,14 +42,16 @@ class PveWelcomePageFAQ extends StatelessWidget {
text:
'Currently only the following 3rd party Spice client works:'),
Center(
- child: OutlineButton(
+ child: OutlinedButton(
onPressed: () => {
launch(
'https://play.google.com/store/apps/details?id=com.undatech.opaque')
},
child: Text('Opague'),
- borderSide: BorderSide(color: ProxmoxColors.supportGrey),
- textColor: Colors.white,
+ style: OutlinedButton.styleFrom(
+ side: BorderSide(color: ProxmoxColors.supportGrey),
+ foregroundColor: Colors.white,
+ ),
),
),
],
diff --git a/lib/widgets/firstWelcomeScreen/pve_welcome_last.dart b/lib/widgets/firstWelcomeScreen/pve_welcome_last.dart
index 5f135e0..3a6391e 100644
--- a/lib/widgets/firstWelcomeScreen/pve_welcome_last.dart
+++ b/lib/widgets/firstWelcomeScreen/pve_welcome_last.dart
@@ -57,23 +57,25 @@ class PveWelcomePageLast extends StatelessWidget {
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
- OutlineButton(
+ OutlinedButton(
onPressed: () =>
{launch('https://forum.proxmox.com')},
child: Text('Forum'),
- borderSide:
- BorderSide(color: ProxmoxColors.supportGrey),
- textColor: Colors.white,
+ style: OutlinedButton.styleFrom(
+ side: BorderSide(color: ProxmoxColors.supportGrey),
+ foregroundColor: Colors.white,
+ ),
),
- OutlineButton(
+ OutlinedButton(
onPressed: () => {
launch(
'https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-user')
},
child: Text('User Mailing List'),
- borderSide:
- BorderSide(color: ProxmoxColors.supportGrey),
- textColor: Colors.white,
+ style: OutlinedButton.styleFrom(
+ side: BorderSide(color: ProxmoxColors.supportGrey),
+ foregroundColor: Colors.white,
+ ),
),
],
),
diff --git a/lib/widgets/pve_cd_selector_widget.dart b/lib/widgets/pve_cd_selector_widget.dart
index c7600fe..cac5288 100644
--- a/lib/widgets/pve_cd_selector_widget.dart
+++ b/lib/widgets/pve_cd_selector_widget.dart
@@ -29,9 +29,10 @@ class PveCdSelector extends StatelessWidget {
onChanged: (value) => cdBloc.events.add(ChangeValue(value)),
),
if (state.value == CdType.iso)
- OutlineButton(
- borderSide:
- state.hasError ? BorderSide(color: Colors.red) : null,
+ OutlinedButton(
+ style: OutlinedButton.styleFrom(
+ side: state.hasError ? BorderSide(color: Colors.red) : null,
+ ),
child: Text((state.file == null || state.file!.isEmpty)
? "Choose File"
: state.file!),
diff --git a/lib/widgets/pve_guest_backup_widget.dart b/lib/widgets/pve_guest_backup_widget.dart
index 72a81c4..b766efb 100644
--- a/lib/widgets/pve_guest_backup_widget.dart
+++ b/lib/widgets/pve_guest_backup_widget.dart
@@ -258,13 +258,12 @@ class PveGuestBackupContent extends StatelessWidget {
child: Padding(
padding: const EdgeInsets.all(8.0),
child: ListView(children: [
- OutlineButton.icon(
- padding: EdgeInsets.symmetric(horizontal: 8),
+ OutlinedButton.icon(
onPressed: null,
icon: Icon(Icons.restore),
label: Text("Restore"),
),
- OutlineButton.icon(
+ OutlinedButton.icon(
onPressed: () async {
final guard = await (_showConfirmDialog(
context,
@@ -279,7 +278,7 @@ class PveGuestBackupContent extends StatelessWidget {
icon: Icon(Icons.delete),
label: Text("Remove"),
),
- OutlineButton.icon(
+ OutlinedButton.icon(
onPressed: () =>
_showConfigurationDialog(context, fBloc, volid),
icon: Icon(Icons.featured_play_list),
@@ -462,7 +461,7 @@ class _PveBackupFormState extends State<PveBackupForm> {
return null;
},
),
- OutlineButton.icon(
+ OutlinedButton.icon(
onPressed: enableSubmitButton
? () {
//TODO remove when async validation is implemented
diff --git a/lib/widgets/pve_main_navigation_drawer.dart b/lib/widgets/pve_main_navigation_drawer.dart
index 57ad0ce..757d05e 100644
--- a/lib/widgets/pve_main_navigation_drawer.dart
+++ b/lib/widgets/pve_main_navigation_drawer.dart
@@ -130,14 +130,14 @@ class PveMainNavigationDrawer extends StatelessWidget {
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
- OutlineButton(
+ OutlinedButton(
child: Text("new VM"),
onPressed: () {
Navigator.pushNamed(context, '/qemu/create');
},
),
// TODO General new button or distinct ones??
- OutlineButton(
+ OutlinedButton(
child: Text("new CT"),
onPressed: null,
)
diff --git a/lib/widgets/pve_task_log_expansiontile_widget.dart b/lib/widgets/pve_task_log_expansiontile_widget.dart
index 03ed1bf..dabe309 100644
--- a/lib/widgets/pve_task_log_expansiontile_widget.dart
+++ b/lib/widgets/pve_task_log_expansiontile_widget.dart
@@ -108,13 +108,13 @@ class _PveTaskExpansionTileState extends State<PveTaskExpansionTile> {
ButtonBar(
children: <Widget>[
if (widget.showMorePage != null)
- OutlineButton.icon(
+ OutlinedButton.icon(
onPressed: () => Navigator.of(context).push(
_createTaskLogRoute(taskLogBloc, widget.showMorePage)),
icon: Icon(Icons.format_list_bulleted),
label: Text('More Tasks'),
),
- OutlineButton.icon(
+ OutlinedButton.icon(
onPressed: () => showTaskLogBottomSheet(context,
taskLogBloc.apiClient, widget.task.node, widget.task.upid),
icon: Icon(Icons.article),
--
2.30.2
next prev parent reply other threads:[~2022-09-08 9:56 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-08 9:55 [pve-devel] [PATCH proxmox-login-manager/pve-flutter-frontend] fixes & update to flutter 3.3 Dominik Csapak
2022-09-08 9:55 ` [pve-devel] [PATCH proxmox-login-manager 1/3] login_form: keep Continue button above Android softnav Dominik Csapak
2022-09-08 9:55 ` [pve-devel] [PATCH proxmox-login-manager 2/3] migrate from FlatButton to TextButton Dominik Csapak
2022-09-08 9:55 ` [pve-devel] [PATCH proxmox-login-manager 3/3] improve colors of login screen Dominik Csapak
2022-09-08 9:55 ` [pve-devel] [PATCH pve-flutter-frontend 01/10] avoid elements hiding behind Android softnav buttons Dominik Csapak
2022-09-08 9:55 ` [pve-devel] [PATCH pve-flutter-frontend 02/10] increase compileSdkVersion to 32 Dominik Csapak
2022-09-08 9:55 ` [pve-devel] [PATCH pve-flutter-frontend 03/10] fix null handling in MainActivity.kt Dominik Csapak
2022-09-08 9:55 ` Dominik Csapak [this message]
2022-09-08 9:55 ` [pve-devel] [PATCH pve-flutter-frontend 05/10] move to TextButton from FlatButton Dominik Csapak
2022-09-08 9:55 ` [pve-devel] [PATCH pve-flutter-frontend 06/10] move to ElevatedButton from RaisedButton Dominik Csapak
2022-09-08 9:55 ` [pve-devel] [PATCH pve-flutter-frontend 07/10] improve colors for indicator/toggles Dominik Csapak
2022-09-08 9:55 ` [pve-devel] [PATCH pve-flutter-frontend 08/10] fix typo Opague -> Opaque Dominik Csapak
2022-09-08 9:55 ` [pve-devel] [PATCH pve-flutter-frontend 09/10] fix guest backup widget start display Dominik Csapak
2022-09-08 9:55 ` [pve-devel] [PATCH pve-flutter-frontend 10/10] fix options view when ostype is null Dominik Csapak
2022-09-08 15:31 ` [pve-devel] applied-series: [PATCH proxmox-login-manager/pve-flutter-frontend] fixes & update to flutter 3.3 Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220908095550.2913416-8-d.csapak@proxmox.com \
--to=d.csapak@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox