Skip to content

Commit

Permalink
change interface in dark theme
Browse files Browse the repository at this point in the history
  • Loading branch information
kidozh committed Aug 9, 2024
1 parent cbe3b9c commit c9a5c9a
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 11 deletions.
2 changes: 2 additions & 0 deletions lib/app/MainApp.dart
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,8 @@ class _MyHomePageState extends State<MyHomePage> with WidgetsBindingObserver {
return Text(S.of(context).appName);
} else {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(value.discuz!.siteName, maxLines: 1, overflow: TextOverflow.ellipsis,),
if (value.user == null)
Expand Down
9 changes: 5 additions & 4 deletions lib/page/LoginPage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -473,8 +473,9 @@ class _LoginFormFieldState extends State<LoginForumFieldStatefulWidget> {
iconedButtons: {
ButtonState.idle: IconedButton(
text: S.of(context).loginTitle,
icon: Icon(Icons.login,
color: Colors.white60),
icon: Icon(AppPlatformIcons(context).loginUserSolid,
color: Theme.of(context).colorScheme.onPrimary
),
color:
Theme.of(context).colorScheme.primary),
ButtonState.loading: IconedButton(
Expand All @@ -484,14 +485,14 @@ class _LoginFormFieldState extends State<LoginForumFieldStatefulWidget> {
text:
S.of(context).progressButtonLoginFailed,
icon:
Icon(Icons.cancel, color: Colors.white),
Icon(AppPlatformIcons(context).loginUserFailedSolid, color: Colors.white),
color: Colors.red.shade300),
ButtonState.success: IconedButton(
text: S
.of(context)
.progressButtonLoginSuccess,
icon: Icon(
Icons.check_circle,
AppPlatformIcons(context).loginUserSuccessSolid,
color: Colors.white,
),
color: Colors.green.shade400)
Expand Down
12 changes: 9 additions & 3 deletions lib/utility/AppPlatformIcons.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ class AppPlatformIcons{

IconData get discuzMessageOutlined => isMaterial(context)? Icons.message_outlined : CupertinoIcons.chat_bubble;

IconData get discuzSiteSolid => isMaterial(context)? Icons.home : CupertinoIcons.today_fill;
IconData get discuzSiteSolid => isMaterial(context)? Icons.home : CupertinoIcons.today;

IconData get discuzSiteOutlined => isMaterial(context)? Icons.home_outlined : CupertinoIcons.today;
IconData get discuzSiteOutlined => isMaterial(context)? Icons.home_outlined : CupertinoIcons.today_fill;

IconData get contactUserSolid => isMaterial(context)? Icons.message : CupertinoIcons.chat_bubble_fill;

Expand Down Expand Up @@ -95,7 +95,7 @@ class AppPlatformIcons{

IconData get formatSizeSolid => isMaterial(context)? Icons.format_size : CupertinoIcons.textformat_size;

IconData get manageDiscuzSolid => isMaterial(context)? Icons.account_tree : CupertinoIcons.rectangle_fill_on_rectangle_angled_fill;
IconData get manageDiscuzSolid => isMaterial(context)? Icons.account_tree : CupertinoIcons.arrow_swap;

IconData get menuSolid => isMaterial(context)? Icons.menu : CupertinoIcons.line_horizontal_3;

Expand Down Expand Up @@ -148,4 +148,10 @@ class AppPlatformIcons{
IconData get adminPostSolid => isMaterial(context)? Icons.settings : CupertinoIcons.hammer_fill;

IconData get stickyPostSolid => isMaterial(context)? Icons.push_pin_outlined : CupertinoIcons.pin;

IconData get loginUserSolid => isMaterial(context)? Icons.login : CupertinoIcons.person_crop_circle;

IconData get loginUserFailedSolid => isMaterial(context)? Icons.error_outline : CupertinoIcons.person_crop_circle_badge_exclam;

IconData get loginUserSuccessSolid => isMaterial(context)? Icons.check_circle : CupertinoIcons.person_crop_circle_badge_checkmark;
}
4 changes: 2 additions & 2 deletions lib/widget/DiscuzNotificationWidget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ class DiscuzNotificationWidget extends StatelessWidget {
return Card(
elevation: 8.0,

// color: brightness == Brightness.light? Colors.white: Colors.black45,
surfaceTintColor: brightness == Brightness.light? Colors.white: Colors.black45,
color: Theme.of(context).brightness == Brightness.light? Colors.white: Colors.white10,
surfaceTintColor: Theme.of(context).brightness == Brightness.light? Colors.white: Colors.white10,
child: Padding(
padding: EdgeInsets.all(4.0),
child: child,
Expand Down
4 changes: 2 additions & 2 deletions lib/widget/ForumThreadWidget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ class ForumThreadState extends State<ForumThreadStatefulWidget>{

elevation: selected ? 0.0: 4.0,
color: selected? Theme.of(context).colorScheme.primaryContainer:
Theme.of(context).brightness == Brightness.light? Colors.white: Colors.white24,
Theme.of(context).brightness == Brightness.light? Colors.white: Colors.white10,
surfaceTintColor: selected? Theme.of(context).colorScheme.primaryContainer:
Theme.of(context).brightness == Brightness.light? Colors.white: Colors.white24,
Theme.of(context).brightness == Brightness.light? Colors.white: Colors.white10,
// color: Theme.of(context).colorScheme.background,
child: Container(
padding: EdgeInsets.only(bottom: 12.0),
Expand Down

0 comments on commit c9a5c9a

Please sign in to comment.