diff --git a/lib/drawer/filter_drawer.dart b/lib/drawer/filter_drawer.dart index 3ce9fa0f..a5dcbedb 100644 --- a/lib/drawer/filter_drawer.dart +++ b/lib/drawer/filter_drawer.dart @@ -62,13 +62,30 @@ class FilterDrawer extends StatelessWidget { border: Border.all(color: Colors.grey.shade300), ), child: ListTile( - title: Text( - filters.pendingFilter - ? 'status : pending' - : 'status : completed', - style: TextStyle( - fontFamily: GoogleFonts.firaMono().fontFamily, - fontSize: 18, + title: RichText( + maxLines: 2, + text: TextSpan( + children: [ + TextSpan( + text: 'Status : ', + style: GoogleFonts.firaMono( + fontWeight: FontWeight.bold, + fontSize: 15, + color: AppSettings.isDarkMode + ? Colors.white + : Colors.black, + ), + ), + TextSpan( + text: filters.pendingFilter ? 'pending' : 'completed', + style: GoogleFonts.firaMono( + fontSize: 15, + color: AppSettings.isDarkMode + ? Colors.white + : Colors.black, + ), + ), + ], ), ), onTap: filters.togglePendingFilter, diff --git a/lib/views/profile/profile.dart b/lib/views/profile/profile.dart index a01bb1df..78318f8e 100644 --- a/lib/views/profile/profile.dart +++ b/lib/views/profile/profile.dart @@ -28,9 +28,9 @@ class _ProfilePageState extends State { return Scaffold( appBar: AppBar( backgroundColor: Palette.kToDark.shade200, - title: const Text( - 'Profiles', - style: TextStyle(color: Colors.white), + title: Text( + profilesMap.length == 1 ? 'Profile' : 'Profiles', + style: const TextStyle(color: Colors.white), ), leading: IconButton( onPressed: () { diff --git a/lib/widgets/profilefunctions/manageprofile.dart b/lib/widgets/profilefunctions/manageprofile.dart index 6d27b2be..6a15f42f 100644 --- a/lib/widgets/profilefunctions/manageprofile.dart +++ b/lib/widgets/profilefunctions/manageprofile.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:google_fonts/google_fonts.dart'; import 'package:tuple/tuple.dart'; @@ -41,7 +42,14 @@ class ManageProfile extends StatelessWidget { : const Color.fromARGB(255, 48, 46, 46), textColor: AppSettings.isDarkMode ? Colors.white : Colors.black, key: const PageStorageKey('manage-profile'), - title: const Text('Manage selected profile'), + title: Text( + 'Manage selected profile', + style: GoogleFonts.firaMono( + fontWeight: FontWeight.bold, + fontSize: 15, + color: AppSettings.isDarkMode ? Colors.white : Colors.black, + ), + ), children: [ for (var triple in triples) ListTile( diff --git a/lib/widgets/profilefunctions/selectprofile.dart b/lib/widgets/profilefunctions/selectprofile.dart index 2bb37911..b22534cd 100644 --- a/lib/widgets/profilefunctions/selectprofile.dart +++ b/lib/widgets/profilefunctions/selectprofile.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; +import 'package:sizer/sizer.dart'; import 'package:taskwarrior/config/app_settings.dart'; @@ -32,9 +33,17 @@ class SelectProfile extends StatelessWidget { title: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - const Text( - 'Profile:', + Text( + 'Current Profile:', overflow: TextOverflow.fade, + style: GoogleFonts.firaMono( + fontWeight: FontWeight.bold, + fontSize: 15, + color: AppSettings.isDarkMode ? Colors.white : Colors.black, + ), + ), + SizedBox( + height: 1.h, ), Text(currentProfile, style: TextStyle( @@ -43,6 +52,28 @@ class SelectProfile extends StatelessWidget { ], ), children: [ + SizedBox( + height: 1.h, + ), + Padding( + padding: EdgeInsets.only(left: 4.w), + child: Row( + children: [ + Text( + 'All Profiles:', + overflow: TextOverflow.fade, + style: GoogleFonts.firaMono( + fontWeight: FontWeight.bold, + fontSize: 15, + color: AppSettings.isDarkMode ? Colors.white : Colors.black, + ), + ), + ], + ), + ), + SizedBox( + height: 1.h, + ), for (var entry in profilesMap.entries) SelectProfileListTile( currentProfile, @@ -71,45 +102,58 @@ class SelectProfileListTile extends StatelessWidget { @override Widget build(BuildContext context) { - return ListTile( - textColor: AppSettings.isDarkMode - ? Colors.white - : const Color.fromARGB(255, 48, 46, 46), - iconColor: AppSettings.isDarkMode - ? Colors.white - : const Color.fromARGB(255, 48, 46, 46), - leading: Radio( - value: uuid, - groupValue: selectedUuid, - onChanged: (_) { - select(); - ScaffoldMessenger.of(context).showSnackBar(SnackBar( - content: Text('Switched to Profile ${alias ?? uuid}'), - )); - }, - activeColor: AppSettings.isDarkMode - ? Colors.white - : const Color.fromARGB(255, 48, 46, 46), - focusColor: AppSettings.isDarkMode - ? Colors.white - : const Color.fromARGB(255, 48, 46, 46), - ), - title: SingleChildScrollView( - key: PageStorageKey('scroll-title-$uuid'), - scrollDirection: Axis.horizontal, - child: Text( - alias ?? '', - style: GoogleFonts.firaMono(), + return Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Radio( + value: uuid, + groupValue: selectedUuid, + onChanged: (_) { + select(); + ScaffoldMessenger.of(context).showSnackBar(SnackBar( + content: Text('Switched to Profile ${alias ?? uuid}'), + )); + }, + activeColor: AppSettings.isDarkMode + ? Colors.white + : const Color.fromARGB(255, 48, 46, 46), + focusColor: AppSettings.isDarkMode + ? Colors.white + : const Color.fromARGB(255, 48, 46, 46), ), - ), - subtitle: SingleChildScrollView( - key: PageStorageKey('scroll-subtitle-$uuid'), - scrollDirection: Axis.horizontal, - child: Text( - uuid, - style: GoogleFonts.firaMono(), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + if (alias != null && alias!.isNotEmpty) + SingleChildScrollView( + key: PageStorageKey('scroll-title-$uuid'), + scrollDirection: Axis.horizontal, + child: Text( + alias!, + style: GoogleFonts.firaMono( + color: AppSettings.isDarkMode + ? Colors.white + : const Color.fromARGB(255, 48, 46, 46), + ), + ), + ), + SingleChildScrollView( + key: PageStorageKey('scroll-subtitle-$uuid'), + scrollDirection: Axis.horizontal, + child: Text( + uuid, + style: GoogleFonts.firaMono( + color: AppSettings.isDarkMode + ? Colors.white + : const Color.fromARGB(255, 48, 46, 46), + ), + ), + ), + ], ), - ), + ], ); } } diff --git a/lib/widgets/project_filter.dart b/lib/widgets/project_filter.dart index b4f682d7..eb1f36fd 100644 --- a/lib/widgets/project_filter.dart +++ b/lib/widgets/project_filter.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; +import 'package:sizer/sizer.dart'; import 'package:taskwarrior/config/app_settings.dart'; import 'package:taskwarrior/widgets/taskw.dart'; @@ -46,11 +47,26 @@ class ProjectsColumn extends StatelessWidget { projects: projects, child: ExpansionTile( key: const PageStorageKey('project-filter'), - title: Text( - 'project:$projectFilter', - style: GoogleFonts.firaMono( - color: AppSettings.isDarkMode ? Colors.white : Colors.black, - fontSize: 18, + title: RichText( + maxLines: 2, + text: TextSpan( + children: [ + TextSpan( + text: 'Project : ', + style: GoogleFonts.firaMono( + fontWeight: FontWeight.bold, + fontSize: 15, + color: AppSettings.isDarkMode ? Colors.white : Colors.black, + ), + ), + TextSpan( + text: projectFilter, + style: GoogleFonts.firaMono( + fontSize: 15, + color: AppSettings.isDarkMode ? Colors.white : Colors.black, + ), + ), + ], ), ), backgroundColor: AppSettings.isDarkMode @@ -59,11 +75,26 @@ class ProjectsColumn extends StatelessWidget { iconColor: AppSettings.isDarkMode ? Colors.white : Colors.black, collapsedIconColor: AppSettings.isDarkMode ? Colors.white : Colors.black, - children: (Map.of(projects) - ..removeWhere((_, nodeData) => nodeData.parent != null)) - .keys - .map(ProjectTile.new) - .toList(), + children: projects.isNotEmpty + ? (Map.of(projects) + ..removeWhere((_, nodeData) => nodeData.parent != null)) + .keys + .map(ProjectTile.new) + .toList() + : [ + Text( + "No Projecs Found", + style: TextStyle( + color: (AppSettings.isDarkMode + ? Colors.white + : const Color.fromARGB(255, 48, 46, 46)), + fontFamily: GoogleFonts.firaMono().fontFamily, + fontSize: 14), + ), + SizedBox( + height: 2.h, + ) + ], ), ); }