Some progress to handle notches / cutouts of phones better in : I have a small lib that gets panel cutout / notch information as paths and can calculate a bounding box . can use it to render cutouts for debugging and can use it for layout (so far only to shift the panel down). (see follow up posts for more pictures).
1️⃣ /4️⃣

phoc rendering cutouts in nexted mode to simulate cutouts and rounded edges:

2️⃣ /4️⃣

Show thread
Follow

phosh using that information to push the top panel down because there's a (simulated) notch:
3️⃣ /4️⃣

MRs are linked here: gitlab.gnome.org/guidog/gmobil

Next steps (after cleaning up a bit and getting it merged) is allowing phosh to make better use of that information (e.g. to shift ui elements to the side instead of down) and providing the information to wayland clients so e.g. video players can make use of it in fullscreen mode.

4️⃣ /4️⃣

Show thread

Finally got to look at this again and instead of just pushing down 's top panel we now place the clock to the left or right based on the available space. The logic is still pretty simple but it covers the cases where we have data for in . Will try to land this in 0.29.0.

Show thread

And this is how it looks on a device with notch. Also enabled PHOC_DEBUG=cutouts so phoc renders the bounding box of these.

Show thread

If your device has a notch or cutout and you want to handle it automatically check phosh.mobi/posts/notch-support on how to describe the display properties.

Show thread

@agx awesome! will use my dumb patch until this happens, thanks!

@agx awesome! will use my dumb patch until this happens, thanks!

@agx awesome! will use my dumb patch until this happens, thanks!

@agx awesome! will use my dumb patch until this happens, thanks!

@gnumdk I certainly appreciate any help to get the top panel flow around notches nicely once the groundwork landed (my doesn't even need notches /cutout support). I hope we get some design input from @snwh how things could look like.

@agx instead of pushing down, shouldn't it efficiently utilise the space, like not display any indicators in the notch area, but still effectively use the panel

@agx

@agx what happens if battery percentage and VPN, and location services are enabled? Is there enough space on the right side? Is there enough space so that nothing is hiden?

Also what happens if you are typing in landscape mode and the text reached the cutouts?

@joao optional features (battery percentage, date, ...) are ignored for the calculation - there's not enough space (there isn't even enough space without a notch). There's also the language indicatore for example and the two kill switches.

Landscape: we don't clamp the space on purpose yet. That's a job for the compositor and we want some wayland protocol for that so it's a different topic.

@joao @agx on android 13, it just overflows extra icons into the notch void. I've seen it even cut some icons in half if there's not enough room to display the whole icon. Not saying phosh should do that, but mighty google hasn't figured it out either :P

@joao @agx this is what I see on an android phone (OP6) with a notch, the VPN icon runs into the notch area and is clipped.

@craftyguy @joao Interesting. That's basically what happens with this MR atm.

@craftyguy @agx

So no one will be able to say: look at how google does it ;)

@joao @craftyguy @agx

heh, I have looked at Android source code a few times to see how they solved a problem I have been having. In general, the answer is they implimented the first thing I thought of but figured that wasnt a great idea.

*shrug*

Sign in to participate in the conversation
Librem Social

Librem Social is an opt-in public network. Messages are shared under Creative Commons BY-SA 4.0 license terms. Policy.

Stay safe. Please abide by our code of conduct.

(Source code)

image/svg+xml Librem Chat image/svg+xml