-
-
Notifications
You must be signed in to change notification settings - Fork 955
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrate color picker into PineTimeStyle watchface #718
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I like this being integrated with the watch face a lot better. The way the buttons appear and disappear probably due to the way the screen is refreshed is interesting.
Seems like going to the settings and swiping to a nonexistent third page crashes the firmware though.
Thanks for your input Riku, I'm going to sort the gauge needle color later but I have noticed something of a bug if double tap to wake is enabled and I tap the buttons too fast, it turns the display off.. |
Doubletapping on the watchface puts the watch to sleep. I believe this can be disabled by returning true in InfiniTime/src/displayapp/DisplayApp.cpp Line 230 in 392c7ad
|
I think there is a better way to implement the gauge needle color change but I haven't figured it out yet. As it stands if the BG is white/needle black and you hit randomise/reset, the needle stays black, until a reboot at least. I think I should be able to set it just once around line 167 but then I have to make sure the gauge is refreshed when closing the settings. |
So much for tidy commits... However, this seems to work as expected, I can't find a better solution to the needle color change so it gets checked when the gauge is created, when the bar BG is changed and on randomize/reset. Not elegant, but it works. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that if you long press on the screen while the buttons are already visible, the big button appears anyway. Also I think pressing the back button should get rid of the buttons instead of going to sleep when the buttons are visible.
EDIT: also on sleep the buttons should probably go away.
Can you make pressing the physical button close the color picker? |
Yes, absolutely, but possibly not until next week. |
Close customizer menu with button in PTS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This includes some changes by me, so someone else should check it too.
So, with help from Riku and others, this finally works as intended. The button closes the picker instead of turning off the screen, and the notification icon and ble icon happily co-exist. I'm not terribly happy with the code for the icon alignment and am open to suggestions on how to improve it - with the previous [notificationState|bleState].IsUpdated code it seemed to hit the else on the second refresh after displaying the notification icon and realiging the ble icon to the center. By using [notificationState|bleState].Get, it works, the only edge case is that if the ble disconnects and the notification icon is visible, it doesn't move to the center. |
It would've been better to tweak the icons in a separate PR, because this PR was ready to merge, but now we need to work on the new changes too, which are not related to the color picker. If you were to revert those changes and work on them in another branch, we could get this merged quicker. IsUpdated should be kept, as without it, the icons are refreshed with every cycle even if they haven't changed. It looks like you are aligning the icons next to each other. I think it would be preferrable if all the icons were aligned in a straight line. Have you tried aligning the icons relative to the previous icon, like in the digital watch face? That way when an icon disappears and all the icons are realigned, the later icons move back to fill the empty space. |
I could put the notification icon centrally aligned below the BLE icon and it wouldn't be too horrible, but it does need something doing since currently the BLE icon is at 0,25 and the notification icon is 0,40 and they overlap. I'll revert this and make a simpler fix later until i have a proper solution worked out. |
This reverts commit 29bb359.
Ok it's done, both icon locations are static but they no longer overlap. It'll look a bit odd when there are notifications but no BLE connection, but I'll start working on a better fix. it's already an improvement on overlapping icons, and tbh the notification icon is very rarely displayed unless people accidentally activate silent mode... |
…face Squashed commit of the following: commit 6cf4a93 Merge: ae4b9e0 42a5cdb Author: Kieran Cawthray <kieranc@gmail.com> Date: Thu Dec 9 22:41:29 2021 +0100 Merge remote-tracking branch 'upstream/develop' into pts-settings commit ae4b9e0 Author: Kieran Cawthray <kieranc@gmail.com> Date: Mon Dec 6 10:29:14 2021 +0100 Include Colors.h commit c00ad4a Merge: 1b2a8a5 85a2530 Author: Kieran Cawthray <kieranc@gmail.com> Date: Sun Dec 5 20:32:29 2021 +0100 Merge remote-tracking branch 'upstream/develop' into pts-settings commit 1b2a8a5 Author: Kieran Cawthray <kieranc@gmail.com> Date: Tue Nov 16 18:18:56 2021 +0100 Improve notification icon alignment commit bea5c60 Author: Kieran Cawthray <kieranc@gmail.com> Date: Tue Nov 16 18:10:34 2021 +0100 Revert "Fix notification icon alignment" This reverts commit 29bb359. commit 29bb359 Author: Kieran Cawthray <kieranc@gmail.com> Date: Tue Nov 16 00:06:13 2021 +0100 Fix notification icon alignment commit 50406ad Merge: 5a0cf8e 624429b Author: Kieran Cawthray <kieranc@gmail.com> Date: Mon Nov 15 22:21:11 2021 +0100 Merge remote-tracking branch 'upstream/develop' into pts-settings commit 5a0cf8e Merge: 2fa63c7 a57fda6 Author: Kieran Cawthray <kieranc@gmail.com> Date: Mon Nov 15 19:38:29 2021 +0100 Merge remote-tracking branch 'upstream/develop' into pts-settings commit 2fa63c7 Merge: 18e3cc7 2e7b51c Author: kieranc <kieranc@gmail.com> Date: Mon Nov 15 19:21:35 2021 +0100 Merge pull request #1 from Riksu9000/pts-settings-fix Close customizer menu with button in PTS commit 2e7b51c Author: Riku Isokoski <riksu9000@gmail.com> Date: Sat Nov 13 13:11:32 2021 +0200 clang-format and clang-tidy PineTimeStyle commit 39157f2 Author: Riku Isokoski <riksu9000@gmail.com> Date: Sat Nov 13 13:02:00 2021 +0200 Close menu with button commit 18e3cc7 Merge: 85d494a 4a5b5f9 Author: Kieran Cawthray <kieranc@gmail.com> Date: Sun Nov 7 17:49:54 2021 +0100 Merge remote-tracking branch 'upstream/develop' into pts-settings commit 85d494a Author: Kieran Cawthray <kieranc@gmail.com> Date: Sat Oct 23 18:12:41 2021 +0200 Revert "Update GetNext/GetPrevious" This reverts commit 411c10e. commit da97a94 Merge: 411c10e 9538eb9 Author: Kieran Cawthray <kieranc@gmail.com> Date: Sat Oct 23 18:00:47 2021 +0200 Merge remote-tracking branch 'upstream/develop' into pts-settings commit 411c10e Author: Kieran Cawthray <kieranc@gmail.com> Date: Wed Oct 20 18:07:08 2021 +0200 Update GetNext/GetPrevious commit 3ed01b3 Author: Kieran Cawthray <kieranc@gmail.com> Date: Wed Oct 20 17:44:10 2021 +0200 Improve random color selection, disable longpress when settings are visible commit 32978b6 Author: Kieran Cawthray <kieranc@gmail.com> Date: Wed Oct 20 15:36:28 2021 +0200 Restore settings order commit 37eed43 Merge: 074d342 f45e094 Author: Kieran Cawthray <kieranc@gmail.com> Date: Wed Oct 20 11:30:42 2021 +0200 Merge branch 'pts-settings' of https://github.com/kieranc/InfiniTime into pts-settings commit 074d342 Author: Kieran Cawthray <kieranc@gmail.com> Date: Wed Oct 20 11:30:06 2021 +0200 Ensure needle color is visible on reset/randomize commit f45e094 Author: Kieran Cawthray <kieranc@gmail.com> Date: Wed Oct 20 11:25:06 2021 +0200 Ensure needle color is visible one reset/randomize commit 994f373 Author: Kieran Cawthray <kieranc@gmail.com> Date: Tue Oct 19 00:22:45 2021 +0200 Change gauge needle color when background is white commit 1c3372b Author: Kieran Cawthray <kieranc@gmail.com> Date: Mon Oct 18 23:29:41 2021 +0200 Fix settings merge error commit ff1fce1 Merge: c4ab17f ab7c6e1 Author: Kieran Cawthray <kieranc@gmail.com> Date: Mon Oct 18 23:14:39 2021 +0200 Merge remote-tracking branch 'upstream/develop' into pts-settings commit c4ab17f Author: Kieran Cawthray <kieranc@gmail.com> Date: Mon Oct 18 23:04:12 2021 +0200 Disable DoubleTap when settings buttons are displayed commit 1c86796 Author: Kieran Cawthray <kieranc@gmail.com> Date: Mon Oct 18 22:52:53 2021 +0200 More duplicate color dodging commit 7d1da9f Author: Kieran Cawthray <kieranc@gmail.com> Date: Sun Oct 3 20:11:04 2021 +0200 Remove old PineTimeStyle settings app commit 3320eae Author: Kieran Cawthray <kieranc@gmail.com> Date: Sun Oct 3 20:01:46 2021 +0200 Initial commit
Looks good to me, great work and nice collaboration @kieranc @Riksu9000 👍 |
This PR aims to move the color picker functionality into the watchface, to avoid cluttering the settings list and potentially add color settings to other watchfaces.
The settings are now accessed with a long tap on the watchface, which shows a button - if the button is pressed within the timeout (currently 5 seconds), the color picker interface is loaded and can be used to change the colors as before. Otherwise the button disappears, this is to hopefully avoid accidental activation.
I plan to add a bit of logic to change the step gauge needle color depending on the background to fix #656 but I'm having a bit of trouble with my dev watch so I thought I'd create this PR to get some more eyes on the code first.