-
Notifications
You must be signed in to change notification settings - Fork 170
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
Title bar always white on windows 10 #834
Comments
The title bar is controlled by Qt. I'm not sure what we can do to fix this? It looks like this is a known issue for Qt on Windows: We should look for a bug upstream in Qt, and comment on it. If one does not exist, we should file a bug. The suggested solution UWP, will not work for neovim-qt. We require most of the disallowed features. Darn! |
I understand now, but can we at least have an option to hide it? I think it can be made with autohotkey but I think doing it here is better. And maybe we can have a custom title bar (I think bleachbit and illustrator do it like that) which can be completely controlled here. But I can settle for just hiding it, because the window can be controlled with keyboard shortcuts. What do you think? |
From my search, I do not see a Qt API to change the title bar theme/color. Without an Qt support, we're stuck with this behavior... Unfortunately, we're limited to the APIs offered by Qt. Using platform-specific solutions outside the Qt framework presents a maintainability problem. Limited time and resources. You'll notice this behavior with other Windows apps too, for example Notepad. I think this is just how Windows renders the titlebar for Win32 API applications. Windows bug? If this can be fixed within the confines of Qt, I am receptive to a Pull Request. |
Alright, thanks for taking the time to explain. Closing. |
No worries! It is unfortunate there isn't a practical fix... |
I just stumbled across your change: It looks like your code addresses the scenario above? Posting here for search. Maybe others will want to manually apply this patch. |
Yes, that's a very basic dark title bar support. Just for my personal use, so always dark title bar (no check for actual user color settings) and no theme change detection. I use this patch for my daily use. It works in my environment (Windows 10 20H2, build 19042.928) but may not work on older environments. It depends on the version of Windows. The APIs used here is hidden and (as far as I know) they were actually changed once before. |
Thanks for the detailed information! 👍 I hope others will find your patch useful too... FYI @K1DV5 |
This is exciting! So I'll need to manually apply it right? And will it eventually be merged into master? |
Yes, you'll need to manually apply this. No, it isn't a good candidate for merge into master. The changes have some quirks/bugs, see statiolate's comments above. Additionally, I'm not sure I want to invest my time to officially maintain this windows-only workaround. This should be fixed in Qt... If you want a semi-official solution, here is an idea:
You'd have to occasionally go in and re-base the change onto the latest
AppVeyor builds expire every 6 months. They'd need to be refreshed at at least this frequency. If the bugs get fixed, and enough users are interested maybe we can officially support the feature at a future date. |
@jgehrig, thank you so much. That's a workable idea and very helpful. |
Since windows 10 introduced the dark theme, more and more apps go along with the theme, and that includes their title bars. Even file explorer has it now. But Neovim-qt always has a white title bar, regardless of the OS theme or the vim theme. I use it fullscreen not to see the title bar but it'd be nice if it went with the surrounding colors even when it's not maximized.
P.S. if the setting to color title bars is on, it gets the accent color, not white.
The text was updated successfully, but these errors were encountered: