nativefier / nativefier

Make any web page a desktop application
MIT License
34.93k stars 2.21k forks source link

Default to transparent title bar (`--title-bar-style hidden / hiddenInset`) on macOS #1041

Open sirpooya opened 4 years ago

sirpooya commented 4 years ago

Problem statement After Build, the App has the default OS Titlebar which is not bad, but It would be much better to be transparent & merge with whole window.

Suggested solution The is an electron app built in Flotato app which transparents the default Titlebar.

Screen Shot 1399-06-12 at 10 45 14 AM

Context

ronjouch commented 4 years ago

@sirpooya from the initial title of your issue, I'm not entirely sure if you don't know this is already supported (see api docs / --title-bar-style), or if you do and what you're asking for is to change the defaults.

I like the idea, but I don't have a Mac to fiddle with it and see how it behaves. I'll happily merge a PR checking these three boxes:

  1. Should we use hidden or hiddenInset or hiddenInset or customButtonsOnHover ? (Electron docs)
  2. How do we make sure the window remains draggable, always, regardless of the website? Our api docs (written by the implementer of --title-bar-style) notes you need custom, site-specific CSS for that. Do we really?

And once these are clear,

  1. Identify a dozen Nativefier Mac active users (look at macos-tagged issues and see commenters) and @mention them asking for their feedback and potential undesirable side-effects
Aiyush-G commented 3 years ago

Hi @sirpooya did you get it to work? If so how?

Cheers

FranzTscharf commented 2 years ago

I think this can be cloes due to:

nativefier --name "Google" https://google.com --title-bar-style 'hiddenInset' --inject ./style.css

style.css content: ` body { -webkit-app-region: drag; }

/ make class elements draggable / .aside-brand-wrapper { -webkit-app-region: drag; padding-top: 5px; }

div#kt_header { -webkit-app-region: drag; }

/ make element with ID not draggable / div#kt_aside_menu_wrapper { -webkit-app-region: no-drag!important; }

div#kt_content { -webkit-app-region: no-drag!important; }

`