mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 14:53:50 +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();
|
return System.Globalization.CultureInfo.CurrentCulture.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void ChangeTheme(int value)
|
||||||
|
{
|
||||||
|
WinformThemer.SetGlobalTheme(value);
|
||||||
|
}
|
||||||
|
|
||||||
public void SetStartup(bool enabled)
|
public void SetStartup(bool enabled)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|||||||
@@ -11397,8 +11397,18 @@ speechSynthesis.getVoices();
|
|||||||
$app.watch.isDarkMode = function () {
|
$app.watch.isDarkMode = function () {
|
||||||
configRepository.setBool('isDarkMode', this.isDarkMode);
|
configRepository.setBool('isDarkMode', this.isDarkMode);
|
||||||
$appDarkStyle.disabled = this.isDarkMode === false;
|
$appDarkStyle.disabled = this.isDarkMode === false;
|
||||||
|
if (this.isDarkMode) {
|
||||||
|
AppApi.ChangeTheme(1);
|
||||||
|
} else {
|
||||||
|
AppApi.ChangeTheme(0);
|
||||||
|
}
|
||||||
this.updateVRConfigVars();
|
this.updateVRConfigVars();
|
||||||
};
|
};
|
||||||
|
if ($app.data.isDarkMode) {
|
||||||
|
AppApi.ChangeTheme(1);
|
||||||
|
} else {
|
||||||
|
AppApi.ChangeTheme(0);
|
||||||
|
}
|
||||||
window
|
window
|
||||||
.matchMedia('(prefers-color-scheme: dark)')
|
.matchMedia('(prefers-color-scheme: dark)')
|
||||||
.addEventListener('change', (e) => {
|
.addEventListener('change', (e) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user