Hard to see scrollbar in menu in light mode

This commit is contained in:
Hillel Coren 2023-01-26 16:58:04 +02:00
parent 3d6c85e01f
commit c2d004977b
1 changed files with 340 additions and 320 deletions

View File

@ -343,7 +343,15 @@ class _MenuDrawerState extends State<MenuDrawer> {
: _expandedCompanySelector),
state.credentials.token.isEmpty
? SizedBox()
: Expanded(
: Theme(
data: state.prefState.enableDarkMode ||
(state.prefState.customColors[PrefState
.THEME_SIDEBAR_INACTIVE_BACKGROUND_COLOR] ??
'')
.isNotEmpty
? ThemeData.dark()
: ThemeData.light(),
child: Expanded(
child: Container(
color: inactiveColor.isNotEmpty
? convertHexStringToColor(inactiveColor)
@ -359,8 +367,8 @@ class _MenuDrawerState extends State<MenuDrawer> {
const EdgeInsets.only(left: 20),
onTap: () =>
launchUrl(Uri.parse(kDebugModeUrl)),
leading:
Icon(Icons.warning, color: Colors.red),
leading: Icon(Icons.warning,
color: Colors.red),
),
)
else
@ -368,11 +376,14 @@ class _MenuDrawerState extends State<MenuDrawer> {
child: ListTile(
tileColor: Colors.red.shade800,
title: Padding(
padding: const EdgeInsets.only(bottom: 6),
padding:
const EdgeInsets.only(bottom: 6),
child: IconText(
icon: Icons.warning,
text: localization.debugModeIsEnabled,
style: TextStyle(color: Colors.white),
text:
localization.debugModeIsEnabled,
style:
TextStyle(color: Colors.white),
),
),
subtitle: Text(
@ -387,7 +398,8 @@ class _MenuDrawerState extends State<MenuDrawer> {
state.isHosted)
if (state.isMenuCollapsed)
Tooltip(
message: localization.verifyPhoneNumberHelp,
message:
localization.verifyPhoneNumberHelp,
child: ListTile(
contentPadding:
const EdgeInsets.only(left: 12),
@ -467,7 +479,8 @@ class _MenuDrawerState extends State<MenuDrawer> {
state.userCompany.isAdmin)
if (state.isMenuCollapsed)
Tooltip(
message: localization.companyDisabledWarning,
message:
localization.companyDisabledWarning,
child: ListTile(
contentPadding:
const EdgeInsets.only(left: 12),
@ -487,11 +500,13 @@ class _MenuDrawerState extends State<MenuDrawer> {
child: ListTile(
tileColor: Colors.orange.shade800,
title: Padding(
padding: const EdgeInsets.only(bottom: 6),
padding:
const EdgeInsets.only(bottom: 6),
child: IconText(
icon: Icons.warning,
text: localization.warning,
style: TextStyle(color: Colors.white),
style:
TextStyle(color: Colors.white),
),
),
subtitle: Text(
@ -550,7 +565,8 @@ class _MenuDrawerState extends State<MenuDrawer> {
clearFilter: true,
company: company,
user: state.user,
section: kSettingsAccountManagement));
section:
kSettingsAccountManagement));
},
),
),
@ -588,7 +604,8 @@ class _MenuDrawerState extends State<MenuDrawer> {
DrawerTile(
company: company,
entityType: EntityType.recurringInvoice,
icon: getEntityIcon(EntityType.recurringInvoice),
icon: getEntityIcon(
EntityType.recurringInvoice),
title: localization.recurringInvoices,
iconTooltip: localization.newRecurringInvoice,
),
@ -651,7 +668,8 @@ class _MenuDrawerState extends State<MenuDrawer> {
DrawerTile(
company: company,
entityType: EntityType.recurringExpense,
icon: getEntityIcon(EntityType.recurringExpense),
icon: getEntityIcon(
EntityType.recurringExpense),
title: localization.recurringExpenses,
),
DrawerTile(
@ -677,7 +695,9 @@ class _MenuDrawerState extends State<MenuDrawer> {
),
],
),
)),
),
),
),
SizedBox(
height: kTopBottomBarHeight,
child: AppBorder(