butler icon indicating copy to clipboard operation
butler copied to clipboard

Investigate more native-feeling header bar/toolbar/window controls

Open cassidyjames opened this issue 1 year ago • 3 comments
trafficstars

Right now I just bold a full-size header bar on top of the window. This makes it look GNOME-y at a glance, but I don't love having the stacked toolbars and ideally could combine them... somehow.

Constraints:

  • Has to work trivially with different versions of Home Assistant/lovelace plugins (I can't test every version and realistically keep up with any DOM changes across versions and plugins)
  • Should still look/feel at home on GNOME (that's my primary target)
  • I'm using WebKitGTK and am not interested in using something else (it would just end be a different app at that point)

cassidyjames avatar Jan 05 '24 21:01 cassidyjames

Maybe I can (optionally) add an overlaid headerbar or something, if that would work? Like a transparent widget you could drag on and that would include the window controls, using injected CSS to move the in-page UI out of the way if needed.

Note, -webkit-app-region: drag is not supported in WebKitGTK afaict.

cassidyjames avatar Jan 05 '24 21:01 cassidyjames

One more thing you can add, is a 'sidebar collapse' icon in the headerbar, to collapse/expand the HA sidebar. (Something similar to libadwaita apps like Tuba etc in the top-left corner) image

properlypurple avatar Jan 06 '24 06:01 properlypurple

@properlypurple I'm not sure that will be reliably triggerable from the native side, as the sidebar is entirely within the web view provided by the Home Assistant server. I could try to inject some JavaScript or something, but it seems error-prone…

cassidyjames avatar May 02 '24 15:05 cassidyjames