Skip to content

Commit

Permalink
fix light mode colors
Browse files Browse the repository at this point in the history
  • Loading branch information
YehudaKremer committed Mar 10, 2022
1 parent 243c1cc commit 8965a84
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 2 additions & 0 deletions lib/models/alarm.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,6 @@ class Alarm {
if (sat) activeDays.add('Sat');
return activeDays;
}

get haveMessage => message != null && message!.isNotEmpty;
}
9 changes: 6 additions & 3 deletions lib/pages/alarmClock/alarmClockFrom.dart
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,12 @@ class _AlarmClockFromState extends State<AlarmClockFrom> {
Container(width: 10),
BasicButton(
title: 'Message',
icon: alarm.message == null || alarm.message!.isEmpty
? FluentIcons.message
: FluentIcons.message_fill,
icon: alarm.haveMessage
? FluentIcons.message_fill
: FluentIcons.message,
color: alarm.haveMessage
? FluentTheme.of(context).accentColor
: FluentTheme.of(context).typography.body!.color,
onPressed: toggleAlarmMessageDialogOpen,
),
Container(width: 20),
Expand Down
4 changes: 2 additions & 2 deletions lib/pages/alarmClock/alarmClockItem.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ class AlarmClockItem extends StatelessWidget {
DateFormat.jm().format(alarm.date),
style: TextStyle(
color: alarm.isActive
? FluentTheme.of(context).activeColor
? FluentTheme.of(context).typography.body!.color
: FluentTheme.of(context).disabledColor,
),
),
alarm.message != null && alarm.message!.isNotEmpty
alarm.haveMessage
? Container(
margin: EdgeInsets.only(left: 10),
child: Tooltip(
Expand Down

0 comments on commit 8965a84

Please sign in to comment.