Conversation
|
Impressive work! I will need some time to review it, so it won't be part of the upcoming 4.7 release, but I'll see what I can to to include it into the 4.8 release. I also do appreciate how you moved as much as the new code as possible into new I'm frankly not to bothered about having some imperfections here and there, as I wasn't planning to spend much time on dark mode until after the expected redesign of the UI to use XAML Islands (which, just like fusion power is about always 50 years away, is about always 2 years away in the case of Rufus), and at this stage I'll be more than happy to have something not too time consuming to integrate, to silence the "DARK MODE WHEN?!?" thread. π
I bet it was. Sorry about that... |
No problem, it just makes me appreciate more automatic memory management. On the other hand c offers more adventure and satisfaction when code compile and run without segfault π. I simplified code more since rufus is using quite basic sets of common controls and as I said I won't be implementing automatic mode change, thus I also removed code related to it. I will do this PR with multiple commits, for easier review. Note that I am currently not planing to add another commits. |
|
Resolve conflict and fix leak. |
|
Thanks for keeping the PR up to date. Considering that there are already a lot of major changes for 4.8, and that I am heaving towards an "early" release of that version, I think I will delay this PR to the 4.9 release (which, in terms of timeframe, I can only say should happen in a month ending in 'ember' this year). But then, provided that there aren't major regressions found in 4.8, I will try to bump the merging of this PR early into the 4.9 release work. |
|
@pbatard I did quick debugging and it seems to be caused by Line 421 in be5642e |
|
Hmm, I'm not seeing that issue at all, be it with the release binaries I am compiling or the Actions build ones. I tested on 3 different physical Windows 11 machines, all fully up to date (and with some different editions there too, as well as quite different hardware) but did not see any issue. Considering that we are invoking At any rate, I am not seeing any of it, and users of the Windows Store version (that is using release MSVC x64 binaries) are also not sending reports of an issue, so, especially as you are not seeing the issue with Windows 10, I'm leaning towards a pure environmental issue on your side. Or are you using an insider release? At any rate, if you believe there is an issue, and since this topic should stay focused on the Dark Mode PR, please open a separate issue, and provide a log, so that I can get a few more details (even if the application crashes, you can get a log through DebugView, but then again, you can just copy/paste the VS output as well if you're recompiling). |
|
I'm working on integrating this patch at long last, but it seems to me like the subclassed #ifdef _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <crtdbg.h>
#endifThen when exiting the app in VS/DEBUG, you might see the following in the Output window (which, in my case, seems to be a direct result of the I'm still working on troubleshooting it, but if you also see the same behaviour and have some idea, I'll take it. PS: Please do not update the patch if you have a solution, as I have already integrated and modified the PR in my working tree (which may potentially be the cause of my issue), so I won't be able to use an altered patch. Instead, I'd rather have some hints on how we can get those |
|
Aha! Looks like it all boils down to the main proc of Rufus calling Line 2326 in 9a32dba None of the |
|
@pbatard Subclass should be removed in |
|
Yeah, at any rate, the documentation for
So using |
|
After some reformatting (to make it look more harmonized with the rest of the code) I think I'm good with the PR, so I am going to push the commit that closes it in a few moments. Massive thanks to @ozone10 again for working on this. I'm sure a lot of folks will greatly appreciate it! |
|
You are welcome. It was good experience working with "c" again after long time. |
fix #1453
My attempt of dark mode for rufus. I was working on this before I've noticed PR #2510 and since it is working quite good I've decided to share it.
It was quite fun to remember difference between c++ and c, when I was porting some code.
This implementation has some considerations which I will not fix, such as "?" static text, green "?" in picture below, on rufus launch when in disabled state it may not look good.
There is no automatic change when user changes system dark mode. The change is not perfect for classic win32 apps, and may cause issues until app is restarted. I consider it important to not cause issues for rufus when it is doing its job such as creating bootable flash drives.
Dark mode is not implemented for system message boxes, as they are part of OS and not rufus.
It is also not implemented for "download" scripts windows.
And mainly it will work only on latest Windows 10 build 19045 and Windows 11.