mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-15 12:53:51 +02:00
Merge branch 'master' of https://github.com/DubyaDude/VRCX
This commit is contained in:
@@ -415,6 +415,11 @@ namespace VRCX
|
||||
return System.Globalization.CultureInfo.CurrentCulture.ToString();
|
||||
}
|
||||
|
||||
public void ChangeTheme(int value)
|
||||
{
|
||||
WinformThemer.SetGlobalTheme(value);
|
||||
}
|
||||
|
||||
public void SetStartup(bool enabled)
|
||||
{
|
||||
try
|
||||
|
||||
@@ -11397,8 +11397,18 @@ speechSynthesis.getVoices();
|
||||
$app.watch.isDarkMode = function () {
|
||||
configRepository.setBool('isDarkMode', this.isDarkMode);
|
||||
$appDarkStyle.disabled = this.isDarkMode === false;
|
||||
if (this.isDarkMode) {
|
||||
AppApi.ChangeTheme(1);
|
||||
} else {
|
||||
AppApi.ChangeTheme(0);
|
||||
}
|
||||
this.updateVRConfigVars();
|
||||
};
|
||||
if ($app.data.isDarkMode) {
|
||||
AppApi.ChangeTheme(1);
|
||||
} else {
|
||||
AppApi.ChangeTheme(0);
|
||||
}
|
||||
window
|
||||
.matchMedia('(prefers-color-scheme: dark)')
|
||||
.addEventListener('change', (e) => {
|
||||
|
||||
Reference in New Issue
Block a user