-
Notifications
You must be signed in to change notification settings - Fork 166
Dark mode message boxes 1.0 #2301
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
base: main
Are you sure you want to change the base?
Conversation
|
|
||
| int WINAPI SoftModalMessageBox_hook(MSGBOXDATA* lpData) | ||
| { | ||
| std::thread darkModeThread{SetDarkMode, lpData->lpszCaption, lpData->dwStyle}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using a thread here has several potential problems:
- The thread might run too late, which will cause the message box to become dark with a delay.
- If message box creation fails, or if it's closed too fast, the thread might become stuck in an infinite loop.
- What if there are several message boxes with the same title (e.g. "Error")?
- The thread loop may cause 100% CPU usage for some time, which isn't so good, especially for laptops.
Have you considered an alternative solution, such as hooking CreateWindow or a similar API?
|
the value of 45 and the font size 16, should be adjusted based on dpi.... it does not look correct on my system |
I updated the mod to be dpi aware. |
@marius-sucan I fixed the gray bar rendering. Also, on my system the default font size is smaller than what this mod uses. |
|
@MGGSK |
I don't see any difference in the font size on my pc, even on 300% dpi but I will add that font size option for users who want it. |
|
@MGGSK I have one laptop with WIN11 24H2 and it works fine there, and another laptop with WIN11 23H2 and it doesn't work there, maybe you have an idea why? |
Can you share a screenshot of the issue? |
|
@MGGSK And I emphasize that on the second laptop with WIN11 24H2 the mod works fine. |
|
@MGGSK |
I added the font size option in the mod settings. |
|
@MGGSK |
|
@MGGSK |
|
Is the mod ready for submission? Are you planning to look at the thread usage (#2301 (comment))? |
I am currently working on removing the thread usage. |
|
@MGGSK |



Enables dark mode for message boxes.