fix system panel color background

This commit is contained in:
mulan xia 2024-02-01 19:51:55 -05:00
parent 97eeb82ef7
commit 50c4ee8d67
No known key found for this signature in database
GPG Key ID: C6CE526613568D73

View File

@ -67,7 +67,12 @@ export const DisplaySettingsDialog = ({ setIsOpen }: ElementProps) => {
label: STRING_KEYS.LIGHT,
},
].map(({ themeSetting, label }) => {
const theme = themeSetting === AppThemeSystemSetting.System ? currentTheme : themeSetting;
const theme =
themeSetting === AppThemeSystemSetting.System
? globalThis.matchMedia('(prefers-color-scheme: dark)').matches
? AppTheme.Dark
: AppTheme.Light
: themeSetting;
const backgroundColor = Themes[theme][currentColorMode].layer2;
const gridColor = Themes[theme][currentColorMode].borderDefault;