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

Windows Dark Mode: initial support #16704

Merged
merged 4 commits into from
Jan 31, 2023
Merged

Windows Dark Mode: initial support #16704

merged 4 commits into from
Jan 31, 2023

Conversation

hrydgard
Copy link
Owner

@hrydgard hrydgard commented Jan 2, 2023

Windows 11-style (Windows 10 also had limited support) dark mode on classic Win32 is a hellscape of hacks. Googling around a bit, I managed to bodge together something that works for the basics (though the dialogs still need a lot of work).

Not sure if this is even worth pursuing, or how to get rid of that annoying white line under the menu bar.

image

@hrydgard hrydgard added the User Interface PPSSPP's own user interface / UX label Jan 2, 2023
@hrydgard hrydgard added this to the v1.15.0 milestone Jan 2, 2023
@unknownbrackets
Copy link
Collaborator

Does DwmSetWindowAttribute(hWnd, DWMWA_USE_IMMERSIVE_DARK_MODE, &value, sizeof(value)) help per https://learn.microsoft.com/en-us/windows/apps/desktop/modernize/apply-windows-themes?

Well, I'm still sticking with 10 for now.

-[Unknown]

@hrydgard
Copy link
Owner Author

hrydgard commented Jan 2, 2023

That function alone just gets us a dark titlebar, menus and dialogs are not affected.

@hrydgard
Copy link
Owner Author

It's a lot of work to convert all the debug windows to support dark mode, so skipping that for now. With the last commits, we have a "consistent-ish" look: everything follows the dark mode setting except the debug windows, which most people won't see, so the user experience is pretty good.

@hrydgard hrydgard marked this pull request as ready for review January 12, 2023 08:01
@hrydgard
Copy link
Owner Author

I'm just gonna get it in, I think it looks quite nice. Let's see if we end up with any compatibility issues with old Windows, or something.

@hrydgard hrydgard merged commit b04dd81 into master Jan 31, 2023
@hrydgard hrydgard deleted the darkmode branch January 31, 2023 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
User Interface PPSSPP's own user interface / UX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants