Skip to content

Draw action bar on left or right depending on screen orientation#1502

Open
deadbaed wants to merge 6 commits into
coredevices:mainfrom
deadbaed:action_bar_left_handed
Open

Draw action bar on left or right depending on screen orientation#1502
deadbaed wants to merge 6 commits into
coredevices:mainfrom
deadbaed:action_bar_left_handed

Conversation

@deadbaed

Copy link
Copy Markdown

Fixes #1464 and #898, there is also a forum post discussing this issue.

AI

I used AI when doing research and during development, I used the Big Pickle model from OpenCode. The model wrote most of the code, the code looks good enough for me, but I'll let the maintainers judge it. Please let me know if it is wrong.

QEMU targets and drivers

I tested only on QEMU targets (mainly on qemu_emery since I own a Pebble Time 2). I also made sure it compiles and looks okay on qemu_flint and qemu_gabbro.

To get left handed mode working on QEMU platforms, I had to add CONFIG_ORIENTATION_MANAGER to the Kconfig files.

Since those boards did not have drivers for the accelerometer and magnetometer (by judging the linking errors and what the AI model told me), I added stub drivers for the QEMU targets.

Development tools

I used the nix dev shell:

nix develop
./pbl configure --board qemu_emery && ./pbl build && ./pbl qemu

Visual results

The UI looks good for the most part when I looked at applications and inside the settings.

There are 2 exceptions, the Factory reset prompt and the Music app:

Screenshot 2026-06-12 at 09 46 57 Screenshot 2026-06-12 at 09 44 56

I did not take the time to investigate why. I am opening this PR to get the discussion going and to gather feedback.

Please let me know if I did something wrong or forgot to do.

deadbaed added 4 commits June 12, 2026 11:01
Draw action bar correctly when in left-handed mode, to have physical
buttons aligned matching icons on the display.

Signed-off-by: Philippe Loctaux <p@philippeloctaux.com>
Make QEMU boards able to be in left-handed mode

Signed-off-by: Philippe Loctaux <p@philippeloctaux.com>
When building QEMU targets with `CONFIG_ORIENTATION_MANAGER`, the
linking was failing on `accel_set_rotated` and `mag_set_rotated`.

Implement stub drivers for QEMU targets.

Signed-off-by: Philippe Loctaux <p@philippeloctaux.com>
Signed-off-by: Philippe Loctaux <p@philippeloctaux.com>
@deadbaed deadbaed requested review from gmarull and jplexer as code owners June 12, 2026 09:41
@gmarull

gmarull commented Jun 12, 2026

Copy link
Copy Markdown
Member

UX should not be impacted (from the screenshots, there seems to be some fixes left to be implemented)

@jplexer

jplexer commented Jun 12, 2026

Copy link
Copy Markdown
Member

we also gotta consider how this is exposed to users (i.e. it should NOT affect legacy apps etc)

@deadbaed

Copy link
Copy Markdown
Author

Took the time to investigate and fix the music app and the factory reset screen:

Screenshot 2026-06-16 at 00 24 19 Screenshot 2026-06-16 at 00 24 28

we also gotta consider how this is exposed to users (i.e. it should NOT affect legacy apps etc)

Absolutely, I am a bit afraid third party apps might be in the same boat as the music app and the factory reset one.

I do not know how to load third party apps on the simulator yet (I'll see how to do that), but I am planning to try out "popular" apps on the pebble app store to see how they would react.

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.

Several of the core apps (Music, Health, Workout, Stopwatch) don't respect Left-Handed Mode

3 participants