mirror of
https://github.com/LNH-team/pico-launcher.git
synced 2025-12-05 13:16:06 +01:00
29 lines
801 B
C++
29 lines
801 B
C++
#include "common.h"
|
|
#include "material/MaterialTheme.h"
|
|
#include "custom/CustomTheme.h"
|
|
#include "ThemeFactory.h"
|
|
|
|
std::unique_ptr<ITheme> ThemeFactory::CreateFromThemeInfo(const ThemeInfo* themeInfo) const
|
|
{
|
|
switch (themeInfo->GetType())
|
|
{
|
|
case ThemeType::Material:
|
|
{
|
|
return std::make_unique<MaterialTheme>(
|
|
themeInfo->GetFolderName(),
|
|
themeInfo->GetPrimaryColor(),
|
|
themeInfo->GetIsDarkTheme());
|
|
}
|
|
case ThemeType::Custom:
|
|
{
|
|
return std::make_unique<CustomTheme>(
|
|
themeInfo->GetFolderName(),
|
|
themeInfo->GetPrimaryColor(),
|
|
themeInfo->GetIsDarkTheme());
|
|
}
|
|
default:
|
|
{
|
|
return nullptr;
|
|
}
|
|
}
|
|
} |