Closed JeromeMartinez closed 4 weeks ago
This does prevent the popup although it still changes views. All the issues seem to be with VCL's implementation of styles which re-spawns the entire window. Unfortunately wihout using styles it seems difficult to make dark mode in VCL. Non-VCL applications can change dark mode without closing and reopening window and they also have native translucent Windows titlebar in dark mode.
The change in this PR needs to be applied to ApplicationEvents1OnSettingChange
too to prevent the same popup for when the mode is changed using Windows settings while MediaInfo is running.
Bug number 1 in https://github.com/MediaArea/MediaInfo/pull/836#issuecomment-2126335967 seems to only happen for files which are open via File Explorer context menu.
I suspect VCL's TrySetStyle
is triggering FormShow
which has code adding command line args to the list.
I found a possible solution for the files duplicating on dark mode change bug mentioned above. I will make a PR later.
See https://github.com/MediaArea/MediaInfo/pull/836#issuecomment-2126335967.