Skip to content

fix: Improved appearance for health screen#854

Merged
gmarull merged 1 commit intocoredevices:mainfrom
freakified:corrected-hrm-square
Feb 19, 2026
Merged

fix: Improved appearance for health screen#854
gmarull merged 1 commit intocoredevices:mainfrom
freakified:corrected-hrm-square

Conversation

@tilden
Copy link
Contributor

@tilden tilden commented Feb 18, 2026

This change fixes the poor rendering of the rotated 4-point square in the HRM UI, and improves the contrast by adding a background color to the heart icon.

Background
In #850, the health screen contrast was improved by changing the background color to white, and by replacing the glitched square with a circle. However, this causes the heart rate screen to no longer visually mesh with the rest of the health UI (which is dark, and uses angular shapes.)

After discussion, @hellcp determined that the root cause for the glitched rectangle was incorrect metrics. By correcting these, it is now possible to display a rectangle that does not glitch:
image

Furthermore, the low-contrast heart graphic appears to be caused by the heart having a transparent, as opposed to white, background color. This commit should also correct this:
Screencast From 2026-02-18 08-57-23.webm

Thanks to @hellcp for figuring all this out and implementing the changes over in pebble-dev/pebble-firmware#319

@tilden tilden changed the title Draft: Improved appearance for health screen fix: Improved appearance for health screen Feb 18, 2026
@tilden tilden force-pushed the corrected-hrm-square branch from 39dc806 to 9ff5ff4 Compare February 18, 2026 13:46
Copy link
Member

@gmarull gmarull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer the current color scheme; it's just more readable. Happy to change circle back to the fixed segments, though.

@tilden
Copy link
Contributor Author

tilden commented Feb 18, 2026

I prefer the current color scheme; it's just more readable. Happy to change circle back to the fixed segments, though.

@gmarull Gotcha! Just pushed a change such that the colors should now match what they were (white bg, dark red foreground). Let me know if you need additional changes!

@gmarull
Copy link
Member

gmarull commented Feb 18, 2026

I prefer the current color scheme; it's just more readable. Happy to change circle back to the fixed segments, though.

@gmarull Gotcha! Just pushed a change such that the colors should now match what they were (white bg, dark red foreground). Let me know if you need additional changes!

Thanks! please fixup original commit, we do not merge intermediate work ;-)

@gmarull
Copy link
Member

gmarull commented Feb 18, 2026

Note we're thinking to make all the health menus lighter to make things consistent and overall more readable

@tilden tilden force-pushed the corrected-hrm-square branch from 8942c1c to e5b63c2 Compare February 18, 2026 20:04
@tilden
Copy link
Contributor Author

tilden commented Feb 18, 2026

Thanks! please fixup original commit, we do not merge intermediate work ;-)

Done! Wasn't really sure what the guideline on that was, so thanks for clarifying!

@gmarull
Copy link
Member

gmarull commented Feb 18, 2026

Since this seems to be derived work from pebble-dev/pebble-firmware#319, can the original author confirm it's Apache-2.0? pebble-firmware messed up licenses a while ago, so I want to be sure.

@tilden
Copy link
Contributor Author

tilden commented Feb 18, 2026

Note we're thinking to make all the health menus lighter to make things consistent and overall more readable

Ah I see! I think consistency could be good there. Might be interesting to play with the colors a bit; perhaps it could borrow from the old OS 3.x health color scheme 🤔

pebble_screenshot_2025-04-10_08-28-41 pebble_screenshot_2025-04-10_08-38-30

@tilden
Copy link
Contributor Author

tilden commented Feb 18, 2026

Since this seems to be derived work from pebble-dev/pebble-firmware#319, can the original author confirm it's Apache-2.0? pebble-firmware messed up licenses a while ago, so I want to be sure.

Sure! I have confirmation from the author on Discord that it's Apache-2.0:

before anyone asks, feel free to copy this into the core repo, and also show me what that looks like
(...)
the file I modified was an apache file and I didn't touch the license there

https://discord.com/channels/221364737269694464/1337430537132048435/1473538292879458357
https://discord.com/channels/221364737269694464/1337430537132048435/1473538474433843211

@gmarull
Copy link
Member

gmarull commented Feb 18, 2026

pls fix CI issues

@tilden
Copy link
Contributor Author

tilden commented Feb 18, 2026

Dang, seems like the tests are failing:

  1) Failure:
test::health::hr::summary::card::render_current_bpm (no description) [../../tests/fw/apps/system_apps/health/test_health_hr_summary_card.c:82] [-t0]
  Expression is not true: gbitmap_pbi_eq(&s_ctx.dest_bitmap, namecat(__func__, ".pbi"))

  2) Failure:
test::health::hr::summary::card::render_no_data (no description) [../../tests/fw/apps/system_apps/health/test_health_hr_summary_card.c:73] [-t1]
  Expression is not true: gbitmap_pbi_eq(&s_ctx.dest_bitmap, namecat(__func__, ".pbi"))

  3) Failure:
test::health::hr::summary::card::render_timestamp (no description) [../../tests/fw/apps/system_apps/health/test_health_hr_summary_card.c:94] [-t2]
  Expression is not true: gbitmap_pbi_eq(&s_ctx.dest_bitmap, namecat(__func__, ".pbi"))

I'm guessing they're slightly different due to the changed metrics. Is there a way to extract the generated test images from the run? In the meantime I'll try regenerating locally.

@gmarull
Copy link
Member

gmarull commented Feb 18, 2026

yes, run tests and look into build/test/tests/failed

@tilden
Copy link
Contributor Author

tilden commented Feb 18, 2026

Unfortunately, seems like there might be issues running the tests on MacOS at the moment; while I can build the firmware fine, the tests always fail with mysterious linker errors:

ld: pointer not aligned in '_s_shadow_bottom_bitmap' (/Users/dan/Development/Pebble/official/PebbleOS/build/test/8f3f6b6b920de209330d4bd28ec690a0/src/fw/applib/ui/shadows.o)
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Seems someone else on the Discord was also unable to get the tests building on Mac. Is there a way to pull them out of the CI runner directly? Might be easier than fighting with it locally.

Edit: managed to get it working!

The rotated 4-point square now renders properly, and the heart icon
has a white background.

Co-Authored-By: Stasia Michalska <hel@lcp.world>
Signed-off-by: Dan Tilden <freakified@gmail.com>
@tilden tilden force-pushed the corrected-hrm-square branch from e5b63c2 to efcd088 Compare February 18, 2026 22:04
@tilden
Copy link
Contributor Author

tilden commented Feb 18, 2026

Got it! Turns out it's possible to get the tests to run on Mac if you disable some various checks in the wscript:

diff --git a/tests/wscript b/tests/wscript
index 8b12f6cd..63773d8e 100644
--- a/tests/wscript
+++ b/tests/wscript
@@ -374,6 +374,12 @@ def build(bld):
         bld.env.append_value('CFLAGS', '-fprofile-arcs')
         bld.env.append_value('CFLAGS', '-ftest-coverage')
         bld.env.append_value('LINKFLAGS', '--coverage')
+
+    import sys
+    if sys.platform == 'darwin':
+        bld.env.append_value('LINKFLAGS', ['-Wl,-no_fixup_chains'])
+        bld.env.append_value('DEFINES', 'DUMA_DISABLED') 
     test_wscript_dirs = [os.path.dirname(f.abspath()) for f in bld.path.ant_glob('**/wscript')]
     for dir in test_wscript_dirs:
         bld.recurse(dir)

I uploaded the new test images, so CI should pass now, hopefully.

@gmarull gmarull merged commit 0d3f1dd into coredevices:main Feb 19, 2026
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants