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

fix some dark mode controls #450

Merged
merged 5 commits into from
Jun 11, 2024
Merged

fix some dark mode controls #450

merged 5 commits into from
Jun 11, 2024

Conversation

rounk-ctrl
Copy link
Contributor

@rounk-ctrl rounk-ctrl commented Jun 9, 2024

some of the dark mode controls look really bad
buttons, combobox, edit
image

smooth listview
no more black artifacts

statusbar
no more artifacts
image

toolbar (for classic)
no more artifacts

@MouriNaruto
Copy link
Member

The changes you need also be done on NanaZip.UI.Modern which is the modern flavor of NanaZip.

Kenji Mouri

@MouriNaruto
Copy link
Member

Have you tested switching light and dark mode at runtime?

Kenji Mouri

@rounk-ctrl
Copy link
Contributor Author

rounk-ctrl commented Jun 10, 2024

wait my bad i didnt add to modern

and theres a lot of issues with this implementation

@rounk-ctrl rounk-ctrl marked this pull request as draft June 10, 2024 10:17
@rounk-ctrl
Copy link
Contributor Author

Have you tested switching light and dark mode at runtime?

Kenji Mouri

yep works

@MouriNaruto
Copy link
Member

MouriNaruto commented Jun 10, 2024

OK. I also have a suggestion.

Maybe you can move listview, toolbar, and statusbar workaround into "NanaZip.Frieren/NanaZip.Frieren.DarkMode.cpp".

Because it can apply to all GUI components which uses the legacy UI controls.

Also can simplify the implementation.

Kenji Mouri

@rounk-ctrl
Copy link
Contributor Author

rounk-ctrl commented Jun 10, 2024

done
image

image

@rounk-ctrl rounk-ctrl marked this pull request as ready for review June 10, 2024 18:30
@MouriNaruto
Copy link
Member

MouriNaruto commented Jun 11, 2024

image

Maybe NanaZip.UI.*'s changes can also be moved to NanaZip.Frieren if OK to simplify the implementation. (For example, LVS_EX_DOUBLEBUFFER and WS_EX_COMPOSITED.)

I want to know something about Refresh_StatusBar's workaround.

In general, your current implementation is almost OK.

Kenji Mouri

@rounk-ctrl
Copy link
Contributor Author

rounk-ctrl commented Jun 11, 2024

i tried moving LVS_EX_DOUBLEBUFFERED to Frieren but it didn't work. I don't know why. It only seems to work if i put it there

For the toolbar, I did move it to Frieren, i forgor to remove it from that file
image

For the statusbar, there was some bug where resizing the window would cause the statusbar text to behave weirdly. So i'm just making it redraw itself while resizing.

@MouriNaruto MouriNaruto merged commit 70e583b into M2Team:main Jun 11, 2024
@MouriNaruto
Copy link
Member

@rounk-ctrl

MileAllowDarkModeForApp should continue to be used because I had done the shim for better compatibility.

image

https://github.com/ProjectMile/Mile.Windows.Helpers/blob/836371d67b512ca93b56ba8ec5b052f8320bb597/Mile.Helpers/Mile.Helpers.cpp#L245

Kenji Mouri

@rounk-ctrl
Copy link
Contributor Author

oh i see, i thought it just called AllowDarkModeForApp. my bad

@MouriNaruto
Copy link
Member

MouriNaruto commented Jun 11, 2024

@rounk-ctrl NanaZip has introduced several wrappers for simplifying the old Windows version compatibility implementation.

Also, I have fixed the tab control theming issue when using the dark and light mode switch dynamically after merging your PR.

be1dec7

Kenji Mouri

@rounk-ctrl
Copy link
Contributor Author

@MouriNaruto btw do not use WS_EX_COMPOSITED with listview. It breaks it

@MouriNaruto
Copy link
Member

Got it.

Kenji Mouri

@eggbean
Copy link

eggbean commented Sep 8, 2024

The Up button is still unfixed. I would prefer to turn off dark mode altogether.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants