webui-dev / webui

Use any web browser or WebView as GUI, with your preferred language in the backend and HTML5 in the frontend, all in a lightweight portable lib.
https://webui.me
MIT License
2.35k stars 144 forks source link

Remove platform-dependent CSS and use browser titlebar on Firefox #398

Closed malisipi closed 3 weeks ago

malisipi commented 3 weeks ago

I removed platform-dependent CSS and used Firefox default titlebar support.

resim

TODO:

Tested on:

hassandraga commented 3 weeks ago

Windows:

image

malisipi commented 3 weeks ago

Actually if can we handle the browser window' HWID from PID in Windows, we can change title and browser logo by manually. Potentially we can add a MutationObserver to handle title changes of page, and change it manually.

hassandraga commented 3 weeks ago

if can we handle the browser window' HWID from PID in Windows

We can't get the exact PID of the window as Firefox create many child process..., and Firefox may add - Mozilla Firefox to the title at any time anyway. It's just too much work for one browser.

Right now, your PR makes Firefox title-bar looks native, and it's way better than the actual userChrome.css style, We can deal with - Mozilla Firefox later...

I will test it on my Mac then it's ready to merge.

hassandraga commented 3 weeks ago

macOS:

image

hassandraga commented 3 weeks ago

Title issue in macOS is another issue to deal with later...

image

hassandraga commented 3 weeks ago

Thank you @malisipi for the PR. You can verify, and merge when you want.

malisipi commented 3 weeks ago

Right now, your PR makes Firefox title-bar looks native, and it's way better than the actual userChrome.css style, We can deal with - Mozilla Firefox later...

You can verify, and merge when you want.

So, I will verify the PR. I will search solution for titlebar, I will create a new PR if I found a good solution. You can merge the PR.