ramensoftware / windhawk

The customization marketplace for Windows programs: https://windhawk.net/
https://windhawk.net
GNU General Public License v3.0
1.07k stars 28 forks source link

An option to make Windhawk to use the host system window theme/style? #62

Open Anixx opened 1 year ago

Anixx commented 1 year ago

It would be very useful, especially the window decorations/frame because currently it is just filled grey rectangle, if you have another app with dark grey color on the background (such as Discord), the window border is simply invisible.

m417z commented 1 year ago

It's not currently supported, but since the Windhawk UI is based on VSCode, you can choose another theme:

Note that the Windhawk UI doesn't look so good with some themes, especially light themes.

image

Anixx commented 1 year ago

I wonder what is this new fashion to make windows without borders? How do they work with it themselves? изображение Am I correct that Microsoft decided to use a browser-based toolkit from Google for their Visual Studio after they decided to switch to the browser from their main competitor? Aren't they crazy?

m417z commented 1 year ago

There's a border in Windows 11.

image

I found these options, you might want to try them: https://github.com/microsoft/vscode/pull/82781#issuecomment-543221612 Instructions:

Not sure that it will work, it didn't for me, but maybe that's because it's not supported on Windows 11.

Am I correct that Microsoft decided to use a browser-based toolkit from Google

Electron is based on Chromium, but it was originally developed by GitHub for Atom, and now GitHub is part of Microsoft. And historically Chromium is based on WebKit, so not 100% of a Google's creation either way.

for their Visual Studio

Visual Studio Code is an unrelated project, like Java is unrelated to JavaScript. And yes, Microsoft is known to be bad with names.

after they decided to switch to the browser from their main competitor? Aren't they crazy?

Would it be better for them to stay with the IE-based Edge? Probably not in the state that it was, and improving it was probably deemed to be too much of an investment. On the one hand, it's bad for competition, but on the other hand, it dilutes Google's control over Chromium, which is IMO a good thing.

Edit: See also https://github.com/microsoft/vscode/issues/153222

Anixx commented 1 year ago

Not sure that it will work, it didn't for me, but maybe that's because it's not supported on Windows 11.

Did not work for me either...

Would it be better for them to stay with the IE-based Edge? Probably not in the state that it was, and improving it was probably deemed to be too much of an investment. On the one hand, it's bad for competition, but on the other hand, it dilutes Google's control over Chromium, which is IMO a good thing.

Microsoft did a lot of stupid things since Bill Gates left the company. One of them is ditching VBA. Then, migrating to JavaScript-based web design. And moving to Chrome-based browser... When I first saw Chrome ads on Google's site that advertised it as the fastest... I thought "who will buy this?"...

And it seems the folks from Microsoft were the ones. They migrated to a browser which became completely detached from their OS. In IE era mshtlml was a standard part of the system. Anyone could embed up-to-date browser control in their applications. Basically, I could make a new browser of my liking in VB6 in 10 minutes. For instance, with two vertical bookmarks bars on right and left and whatever. Now, what? I have to include a browser engine with my program if I want it to display web content? Besides this, Chrome is sumply an awful browser, it does not, for instance, support MathML, which is the main reason, why Wikipedia still uses SVG for formulas rendering (and other sites use MathJax which is very slow). Its font rendering is also far inferior compared to the Windows built-in Cleartype (and anyway, why an OS shoud include separate fonts engines for different purposes?). Chrome is simply not integrated with Windows.

On the other hand, Chrome is of course better than the Metro-based Edge, it is a desktop app after all.

m417z commented 1 year ago

Did not work for me either...

Yes, you're right, turns out that it was removed in a recent version: https://github.com/microsoft/vscode/issues/160159 We'll have to wait for Microsoft to implement https://github.com/microsoft/vscode/issues/153222

Now, what? I have to include a browser engine with my program if I want it to display web content?

There's the WebView2 control. For example, Tauri, a lightweight Electron alternative, uses it. There was an issue about making VSCode more lightweight with it but it was rejected: https://github.com/microsoft/vscode/issues/118308

obones commented 1 year ago

Note that the Windhawk UI doesn't look so good with some themes, especially light themes.

Yes, that's quite unfortunate because white on white background is not readable at all. And as I'm one of the roughly 30% of the population that see stars around every light source, the dark theme is a pain to use, each letter is blurry. Would it be possible to consider having a light theme, simply reversing the background and font color?

SirWobbyTheFirst commented 4 months ago

So I was able to set it to use the native theme by doing the Ctrl+Alt+Shift+P option as mentioned and then typing preferences, there was then an option to open the Settings UI and then I searched for title in the settings page and was able to switch it to using the Native option, WH prompted to restart and applied the theme.

It shows the Menubar by default but going into Settings again and searching for menu has an option to hide the menubar. The only issue is that you cannot exit the Settings page, so you have to close and restart the app, but that's a minor hiccup.

image

Anixx commented 4 months ago

In Classic Theme the native window border is glitchy, not getting redrawn when needed.

But if after enabling native theming, add it to Classic Theme Browser Fix mod, the border becomes Aero Lite: изображение

YellowAfterlife commented 1 month ago

I was similarly pleased to find that I can change the code editor theme and then slightly less pleased to find that it applies to the background of the main window (couldn't care less that the cards are still white-on-black, I don't have to look at them for too long).

If you update to a newer Electron version later on (v24 or newer, by the looks of it?), you could change your

color: hsla(0,0%,100%,.85);

to

color: color-mix(in srgb, var(--vscode-editor-foreground), transparent 15%);

and that would respect the theme's font color.

Or could just pick a similar color from the theme unless the slightly-muted white is all too precious for aesthetics.

For the time I settled for someone's plugin that adds a light/dark theme toggle button to the status bar.