Set logo scaling to linear interpolation in CarouselComponent.

This commit is contained in:
Leon Styhre 2022-03-17 19:34:41 +01:00
parent 5de2855d60
commit 86ad917bc8

View file

@ -52,6 +52,7 @@ void CarouselComponent::addEntry(const std::shared_ptr<ThemeData>& theme,
if ((!path.empty() && ResourceManager::getInstance().fileExists(path)) || if ((!path.empty() && ResourceManager::getInstance().fileExists(path)) ||
(!defaultPath.empty() && ResourceManager::getInstance().fileExists(defaultPath))) { (!defaultPath.empty() && ResourceManager::getInstance().fileExists(defaultPath))) {
auto logo = std::make_shared<ImageComponent>(false, false); auto logo = std::make_shared<ImageComponent>(false, false);
logo->setLinearInterpolation(true);
logo->setMaxSize(glm::round(mLogoSize * mLogoScale)); logo->setMaxSize(glm::round(mLogoSize * mLogoScale));
logo->applyTheme(theme, "system", "image_logo", logo->applyTheme(theme, "system", "image_logo",
ThemeFlags::PATH | ThemeFlags::COLOR); ThemeFlags::PATH | ThemeFlags::COLOR);
@ -64,6 +65,7 @@ void CarouselComponent::addEntry(const std::shared_ptr<ThemeData>& theme,
if (entry.data.logoPath != "" && if (entry.data.logoPath != "" &&
ResourceManager::getInstance().fileExists(entry.data.logoPath)) { ResourceManager::getInstance().fileExists(entry.data.logoPath)) {
auto logo = std::make_shared<ImageComponent>(false, false); auto logo = std::make_shared<ImageComponent>(false, false);
logo->setLinearInterpolation(true);
logo->setImage(entry.data.logoPath); logo->setImage(entry.data.logoPath);
logo->setMaxSize(glm::round(mLogoSize * mLogoScale)); logo->setMaxSize(glm::round(mLogoSize * mLogoScale));
logo->applyTheme(theme, "system", "", ThemeFlags::ALL); logo->applyTheme(theme, "system", "", ThemeFlags::ALL);
@ -73,6 +75,7 @@ void CarouselComponent::addEntry(const std::shared_ptr<ThemeData>& theme,
else if (entry.data.defaultLogoPath != "" && else if (entry.data.defaultLogoPath != "" &&
ResourceManager::getInstance().fileExists(entry.data.defaultLogoPath)) { ResourceManager::getInstance().fileExists(entry.data.defaultLogoPath)) {
auto defaultLogo = std::make_shared<ImageComponent>(false, false); auto defaultLogo = std::make_shared<ImageComponent>(false, false);
defaultLogo->setLinearInterpolation(true);
defaultLogo->setImage(entry.data.defaultLogoPath); defaultLogo->setImage(entry.data.defaultLogoPath);
defaultLogo->setMaxSize(glm::round(mLogoSize * mLogoScale)); defaultLogo->setMaxSize(glm::round(mLogoSize * mLogoScale));
defaultLogo->applyTheme(theme, "system", "", ThemeFlags::ALL); defaultLogo->applyTheme(theme, "system", "", ThemeFlags::ALL);