Skip to content

Allow to shift top-panel down to help notches

Guido Günther requested to merge guidog/phosh:top-panel-height into main

Allow to shift the top panel down via device information.

The offset is supposed to be in physical pixels. This is rough cuts but already works better here than CSS.

TODOs (some of those could just be follow ups as we don't break existing uses, but markig as draft anyway)

  • don't apply offset in landscape mode
  • update offset on video mode or scaling changes
  • take video mode into account when calculating offset (we currently assume highest resolution) (can happen later as we apply that to built-in panel)
  • drop the top-margin from the stack when unfolded since otherwise there's less space for notifications
  • apply gsetting changes immediately (not only when panels are recreated or output config changed) (We read device information)
  • only apply offset to built-in display

I figured it's preferable to shift down as this prevents us from having the clock out of center and or overlapping with icons and devices with notches usually have high resolution displays.



More dynamic top-bar layout will come via separate MRs.

Helps: #552 (closed)

Edited by Guido Günther

Merge request reports