From cd43fd60415c9a0e6ee5025ae54d9a749c54e37d Mon Sep 17 00:00:00 2001 From: Patryk Hegenberg Date: Mon, 27 May 2024 22:25:13 +0200 Subject: [PATCH] feature(gui): adjusted color settings for buttons and settings screen --- .../lib/pages/receive_screen.dart | 2 +- flutter_test_gui/lib/pages/send_screen.dart | 2 +- .../lib/pages/settings_screen.dart | 37 ++++++++++++++++--- 3 files changed, 34 insertions(+), 7 deletions(-) diff --git a/flutter_test_gui/lib/pages/receive_screen.dart b/flutter_test_gui/lib/pages/receive_screen.dart index de8331e..dc1263d 100644 --- a/flutter_test_gui/lib/pages/receive_screen.dart +++ b/flutter_test_gui/lib/pages/receive_screen.dart @@ -183,7 +183,7 @@ class ReceiveScreenState extends State { ElevatedButton( style: ElevatedButton.styleFrom( backgroundColor: Constants.textColor, - foregroundColor: Constants.highlightColor, + foregroundColor: Constants.backColor, shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(20), ), diff --git a/flutter_test_gui/lib/pages/send_screen.dart b/flutter_test_gui/lib/pages/send_screen.dart index f964774..0b97161 100644 --- a/flutter_test_gui/lib/pages/send_screen.dart +++ b/flutter_test_gui/lib/pages/send_screen.dart @@ -106,7 +106,7 @@ class SendScreenState extends State { ElevatedButton( style: ElevatedButton.styleFrom( backgroundColor: Constants.textColor, - foregroundColor: Constants.highlightColor, + foregroundColor: Constants.backColor, shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(20), ), diff --git a/flutter_test_gui/lib/pages/settings_screen.dart b/flutter_test_gui/lib/pages/settings_screen.dart index c74a8e6..f001954 100644 --- a/flutter_test_gui/lib/pages/settings_screen.dart +++ b/flutter_test_gui/lib/pages/settings_screen.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:shared_preferences/shared_preferences.dart'; +import 'package:flutter_test_gui/consts/consts.dart'; class SettingsScreen extends StatefulWidget { @override @@ -50,8 +51,11 @@ class _SettingsScreenState extends State { @override Widget build(BuildContext context) { return Scaffold( + backgroundColor: Constants.backColor, appBar: AppBar( title: const Text('Settings'), + backgroundColor: const Color(0xFF292c3c), //0xFF282C34), + foregroundColor: Constants.textColor, ), body: Padding( padding: const EdgeInsets.all(16.0), @@ -59,25 +63,48 @@ class _SettingsScreenState extends State { children: [ TextField( controller: _appEnvironmentController, - decoration: const InputDecoration(labelText: 'App Environment'), + decoration: const InputDecoration( + labelText: 'App Environment', + labelStyle: TextStyle(color: Constants.highlightColor)), + style: const TextStyle(color: Constants.textColor), ), TextField( controller: _appHostController, - decoration: const InputDecoration(labelText: 'App Host'), + decoration: const InputDecoration( + labelText: 'App Host', + labelStyle: TextStyle(color: Constants.highlightColor)), + style: const TextStyle(color: Constants.textColor), ), TextField( controller: _appPortController, - decoration: const InputDecoration(labelText: 'App Port'), + decoration: const InputDecoration( + labelText: 'App Port', + labelStyle: TextStyle(color: Constants.highlightColor)), + style: const TextStyle(color: Constants.textColor), ), TextField( controller: _appOriginController, - decoration: const InputDecoration(labelText: 'App Origin'), + decoration: const InputDecoration( + labelText: 'App Origin', + labelStyle: TextStyle(color: Constants.highlightColor)), + style: const TextStyle(color: Constants.textColor), ), TextField( controller: _appRelayController, - decoration: const InputDecoration(labelText: 'App Relay'), + decoration: const InputDecoration( + labelText: 'App Relay', + labelStyle: TextStyle(color: Constants.highlightColor)), + style: const TextStyle(color: Constants.textColor), ), + Spacer(), ElevatedButton( + style: ElevatedButton.styleFrom( + backgroundColor: Constants.textColor, + foregroundColor: Constants.backColor, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(20), + ), + ), onPressed: () async { await saveSettings(); Navigator.pop(context);