Change into switch expression to make it concise
This commit is contained in:
parent
d2571fb5d5
commit
a0cd13377e
1 changed files with 6 additions and 13 deletions
|
@ -117,20 +117,13 @@ namespace Ryujinx.Ava
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convert PlatformThemeVariant to the expected ThemeVariant type
|
// Convert PlatformThemeVariant to the expected ThemeVariant type
|
||||||
private ThemeVariant ConvertThemeVariant(PlatformThemeVariant platformThemeVariant)
|
private ThemeVariant ConvertThemeVariant(PlatformThemeVariant platformThemeVariant) =>
|
||||||
|
platformThemeVariant switch
|
||||||
{
|
{
|
||||||
switch (platformThemeVariant)
|
PlatformThemeVariant.Dark => ThemeVariant.Dark,
|
||||||
{
|
PlatformThemeVariant.Light => ThemeVariant.Light,
|
||||||
case PlatformThemeVariant.Dark:
|
_ => ThemeVariant.Default,
|
||||||
return ThemeVariant.Dark;
|
};
|
||||||
|
|
||||||
case PlatformThemeVariant.Light:
|
|
||||||
return ThemeVariant.Light;
|
|
||||||
|
|
||||||
default:
|
|
||||||
return ThemeVariant.Default;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private ThemeVariant DetectSystemTheme()
|
private ThemeVariant DetectSystemTheme()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue