mirror of
https://github.com/InfiniTimeOrg/InfiniTime.git
synced 2024-10-22 15:11:51 +02:00
fixed that label ampm stays shown when alarm status is hidden
This commit is contained in:
parent
48cfd48e39
commit
edb61e7658
22
doc/alarmStatusOnInfineat/alarmStatusOnInfineat.md
Normal file
22
doc/alarmStatusOnInfineat/alarmStatusOnInfineat.md
Normal file
|
@ -0,0 +1,22 @@
|
|||
# [InfiniTime : show alarm status on infineat watchface](https://github.com/Eve1374/InfiniTime/tree/alarm-status-on-infineat)
|
||||
- I forked from [InfiniTime](https://github.com/InfiniTimeOrg/InfiniTime) and added a branch alarm-status-on-infineat
|
||||
- I modified the watchface settings to have the possibility to show alarm status on watchface
|
||||
|
||||
Here are pictures with alarm set in 12 and 24hrs format :
|
||||
|
||||
![alarm set and shown, 12hrs format](infineat_alarm_set_12hrs.png "alarm set and shown, 12hrs format")
|
||||
![alarm set and shown, 24hrs format](infineat_alarm_set_24hrs.png "alarm set and shown, 24hrs format")
|
||||
|
||||
Alarm not set :
|
||||
|
||||
![alarm shown and not set](infineat_alarm_notset.png "alarm shown and not set")
|
||||
|
||||
Settings view :
|
||||
|
||||
![settings](infineat_settings.png "settings modified with a button to turn on or off alarm display")
|
||||
|
||||
|
||||
## Possible further development :
|
||||
- Move this setting to the Alarm app and include alarm display in all watchfaces ?
|
||||
|
||||
|
BIN
doc/alarmStatusOnInfineat/infineat_alarm_notset.png
Normal file
BIN
doc/alarmStatusOnInfineat/infineat_alarm_notset.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.2 KiB |
BIN
doc/alarmStatusOnInfineat/infineat_alarm_set_12hrs.png
Normal file
BIN
doc/alarmStatusOnInfineat/infineat_alarm_set_12hrs.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.5 KiB |
BIN
doc/alarmStatusOnInfineat/infineat_alarm_set_24hrs.png
Normal file
BIN
doc/alarmStatusOnInfineat/infineat_alarm_set_24hrs.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.1 KiB |
BIN
doc/alarmStatusOnInfineat/infineat_settings.png
Normal file
BIN
doc/alarmStatusOnInfineat/infineat_settings.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.5 KiB |
|
@ -257,6 +257,7 @@ WatchFaceInfineat::WatchFaceInfineat(Controllers::DateTime& dateTimeController,
|
|||
if (!settingsController.GetInfineatShowAlarmStatus()) {
|
||||
lv_obj_set_hidden(labelAlarm, true);
|
||||
lv_obj_set_hidden(alarmIcon, true);
|
||||
lv_obj_set_hidden(labelTimeAmPmAlarm, true);
|
||||
}
|
||||
|
||||
stepValue = lv_label_create(lv_scr_act(), nullptr);
|
||||
|
@ -417,6 +418,7 @@ void WatchFaceInfineat::UpdateSelected(lv_obj_t* object, lv_event_t event) {
|
|||
bool newShowAlarmStatus = settingsController.GetInfineatShowAlarmStatus();
|
||||
lv_obj_set_hidden(labelAlarm, !newShowAlarmStatus);
|
||||
lv_obj_set_hidden(alarmIcon, !newShowAlarmStatus);
|
||||
lv_obj_set_hidden(labelTimeAmPmAlarm, !newShowAlarmStatus);
|
||||
const char* labelToggleAlarm = newShowAlarmStatus ? Symbols::bell : Symbols::notbell;
|
||||
lv_label_set_text_static(lblAlarm, labelToggleAlarm);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue