Q: possible to switch from dark to non-dark within a programs's session?
klaus101 opened this issue · 17 comments
Studying the examples, i achieved to replace my diverse IFDEFs for to control the program's mode (dark or non-dark) by
"if IsDarkModeEnabled", so that i control the program's behaviour by an inifile key. That works well.
Technically by a procedure, triggered from main form's initialization, that reads an ini key and sets PreferredAppMode.
Now, i'm wondering if it's possible to switch dark mode ON/OFF during a program's run (some programs are able to behave so).
Is this possible, after the app started dark, to switch to non-dark, and vice versa?
(i'm aware by the examples, that's possible to change the color scheme, but this is not the same).
You can't turn it on and off. but I will try to make it possible to switch the color scheme while the program is running
Ok. But, switching color schemes (resp. to simulate a non-dark mode by scheme) wouldn't be the same as to toggle the dark mode completely.
Not a problem, would have been only a little nice-to-have on top.
Fyi i had picked up one of the examples for to play with (attached; does contain all nevessary files without the need to have the package installed).
See the button "Do light mode" on the right (actually it has no immediate effect, needs restart).
testproject_use_inifile.zip
Make it using the package, make a pull request and I'll include it in the examples
Counterproposal: like me some others might prefer not to install every package but to attract a few needed files on runtime base on app level (eg: for to use the ATTabs i don't want wo install a whole flat control bundle ... needing only 4 files).
Could it make sense to keep it as sample for that (usage without package installation)?
I'm not against using it in any form. But i do distribute this as a package and attach examples of use as a package. Everyone decides for himself what will happen next))
Well ...
Not very familiar with the github workflow, beyond "code" i don't see the option for to create a new branch (as needed for a pull request), so for easyness i attach the modified sample which uses the runtime lpk now.
I assume you'll want to remove inside some unnecessary comment lines before.
I would prefer that you were the author of this example entirely. Therefore, master the process pull request)) There is nothing complicated there
You need fork my reepo, create branch in your repo, push to your repo-branch and create pull requests
But there isn't any need or a wish to create a private copy resp. fork of the repo.
Isn't it better you add me as collaborateur in you repo's settings?
See:
https://stackoverflow.com/questions/14969281/git-how-to-give-people-push-access-that-needs-to-be-merged-in-by-organizers
Settings --> Manage Access --> Invite teams or people // or similar
if you want to participate in the development, that of course I will add you. But just to add this example you will have to make a fork
A whole fork only for a small sample, which arose just on the fly besides (as originally i'd simply intended to ask if we could turn dark mode off) ...
Hm, maybe i create the fork, but probably i'd remove it afterwards again, because i won't need it for any other purpose. Remembering having seen, over times, a lot of forks that appeared orphaned (dozens "commits behind" ...).
But - mainly - sorry for any inconvenience about this matters: I appreciate your efforts a lot!
Here we go, pull request opened
and closed))
I think it's good to have such example, thanks for attention.
Back to the OP question i understood it's not possible (so it's no surprise that DblCommander itself does require a restart).
Nevertheless i'm wondering that Notepad++ can do which afaics refers to the same technology basics.
If any new findings should come up, this thread would be a good place to inform. For now: closing.
Closing