Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
cassidyjames opened this issue Jan 5, 2024 · 3 comments
Open

Comments

@cassidyjames
Copy link
Owner

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
Copy link
Owner Author

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.

@properlypurple
Copy link

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

@cassidyjames
Copy link
Owner Author

@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…

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

No branches or pull requests

2 participants