opt mobile dark theme

This commit is contained in:
csf 2022-09-23 17:16:25 +08:00
parent cf31ec3a53
commit d2d531516a
4 changed files with 19 additions and 16 deletions

View File

@ -160,7 +160,7 @@ class MyTheme {
textTheme: const TextTheme( textTheme: const TextTheme(
titleLarge: TextStyle(fontSize: 19), titleLarge: TextStyle(fontSize: 19),
bodySmall: TextStyle(fontSize: 12, height: 1.25)), bodySmall: TextStyle(fontSize: 12, height: 1.25)),
hintColor: Color(0xFF555555), cardColor: Color(0xFF252525),
primarySwatch: Colors.blue, primarySwatch: Colors.blue,
visualDensity: VisualDensity.adaptivePlatformDensity, visualDensity: VisualDensity.adaptivePlatformDensity,
tabBarTheme: const TabBarTheme( tabBarTheme: const TabBarTheme(

View File

@ -201,9 +201,9 @@ class _PeerSearchBarState extends State<PeerSearchBar> {
drawer = true; drawer = true;
}); });
}, },
icon: const Icon( icon: Icon(
Icons.search_rounded, Icons.search_rounded,
color: MyTheme.dark, color: Theme.of(context).hintColor,
)); ));
} }
@ -267,9 +267,9 @@ class _PeerSearchBarState extends State<PeerSearchBar> {
drawer = false; drawer = false;
}); });
}, },
icon: const Icon( icon: Icon(
Icons.close, Icons.close,
color: MyTheme.dark, color: Theme.of(context).hintColor,
)), )),
], ],
), ),

View File

@ -128,8 +128,8 @@ class _ConnectionPageState extends State<ConnectionPage> {
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 2), padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 2),
child: Ink( child: Ink(
decoration: const BoxDecoration( decoration: BoxDecoration(
color: MyTheme.white, color: Theme.of(context).cardColor,
borderRadius: BorderRadius.all(Radius.circular(13)), borderRadius: BorderRadius.all(Radius.circular(13)),
), ),
child: Row( child: Row(

View File

@ -170,7 +170,7 @@ class ServerInfo extends StatelessWidget {
icon: const Icon(Icons.perm_identity), icon: const Icon(Icons.perm_identity),
labelText: translate("ID"), labelText: translate("ID"),
labelStyle: const TextStyle( labelStyle: const TextStyle(
fontWeight: FontWeight.bold, color: MyTheme.accent50), fontWeight: FontWeight.bold, color: MyTheme.accent80),
), ),
onSaved: (String? value) {}, onSaved: (String? value) {},
), ),
@ -185,7 +185,7 @@ class ServerInfo extends StatelessWidget {
icon: const Icon(Icons.lock), icon: const Icon(Icons.lock),
labelText: translate("Password"), labelText: translate("Password"),
labelStyle: const TextStyle( labelStyle: const TextStyle(
fontWeight: FontWeight.bold, color: MyTheme.accent50), fontWeight: FontWeight.bold, color: MyTheme.accent80),
suffix: isPermanent suffix: isPermanent
? null ? null
: IconButton( : IconButton(
@ -213,7 +213,7 @@ class ServerInfo extends StatelessWidget {
fontFamily: 'WorkSans', fontFamily: 'WorkSans',
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 18, fontSize: 18,
color: MyTheme.accent80, color: MyTheme.accent,
), ),
)) ))
], ],
@ -304,7 +304,8 @@ class _PermissionCheckerState extends State<PermissionChecker> {
softWrap: true, softWrap: true,
style: const TextStyle( style: const TextStyle(
fontSize: 14.0, fontSize: 14.0,
color: MyTheme.accent50))) fontWeight: FontWeight.w500,
color: MyTheme.accent80)))
], ],
) )
: const SizedBox.shrink()) : const SizedBox.shrink())
@ -334,7 +335,9 @@ class PermissionRow extends StatelessWidget {
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
child: Text(name, child: Text(name,
style: const TextStyle( style: const TextStyle(
fontSize: 16.0, color: MyTheme.accent50)))), fontSize: 16.0,
fontWeight: FontWeight.bold,
color: MyTheme.accent80)))),
Expanded( Expanded(
flex: 2, flex: 2,
child: FittedBox( child: FittedBox(
@ -398,7 +401,7 @@ class ConnectionManager extends StatelessWidget {
}, },
icon: const Icon( icon: const Icon(
Icons.chat, Icons.chat,
color: MyTheme.accent80, color: MyTheme.accent,
))) )))
], ],
), ),
@ -460,8 +463,8 @@ class PaddingCard extends StatelessWidget {
titleIcon != null titleIcon != null
? Padding( ? Padding(
padding: const EdgeInsets.only(right: 10), padding: const EdgeInsets.only(right: 10),
child: Icon(titleIcon, child:
color: MyTheme.accent80, size: 30)) Icon(titleIcon, color: MyTheme.accent, size: 30))
: const SizedBox.shrink(), : const SizedBox.shrink(),
Text( Text(
title!, title!,
@ -469,7 +472,7 @@ class PaddingCard extends StatelessWidget {
fontFamily: 'WorkSans', fontFamily: 'WorkSans',
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 20, fontSize: 20,
color: MyTheme.accent80, color: MyTheme.accent,
), ),
) )
], ],