knicholson32 / stratux_ahrs

AHRS Display for the Raspberry pi powered Stratux software
MIT License
19 stars 8 forks source link

Add space for iPhone status bar #4

Open knicholson32 opened 6 years ago

knicholson32 commented 6 years ago

Issue

When starting the display in portrait mode, a space is carved out for the status bar. Upon transitioning the display to landscape mode and back to portrait mode, the safari webapp recalculates the status bar dimensions and for some reason converts it to black-transparent. There should be a soft-fix for this.

The below images illustrate this transition. Notice the status bar on the left of the display.

img_0364

... transition to landscape and back to portrait ...

img_0365

Proposed Fix

When the display starts up, if it is running on an iPhone and is in portrait mode, it should save the dimensions of the screen. If it ever returns to portrait mode from landscape and the screen width has increased, it should fill the gap with black and float right, creating space for the status bar.

knicholson32 commented 6 years ago

Mostly addressed with commit 5d33455. Still has the following issues on iPhone only:

Issue 1

Occurs when force reloading the display from portrait mode (through the inspector, after the system has accounted for the status bar space) and then going from landscape to portrait.

img_0372

Issue 2

Occurs when opening the display in landscape mode and going to portrait:

img_0371