Removed some unnecessary applyTheme calls from CarouselComponent and GridComponent

This commit is contained in:
Leon Styhre 2023-09-22 17:29:14 +02:00
parent 493f51cbe8
commit 42e5e2c096
2 changed files with 0 additions and 6 deletions

View file

@ -313,7 +313,6 @@ void CarouselComponent<T>::addEntry(Entry& entry, const std::shared_ptr<ThemeDat
item->setCroppedSize(glm::round(mItemSize * (mItemScale >= 1.0f ? mItemScale : 1.0f))); item->setCroppedSize(glm::round(mItemSize * (mItemScale >= 1.0f ? mItemScale : 1.0f)));
item->setCornerRadius(mImageCornerRadius); item->setCornerRadius(mImageCornerRadius);
item->setImage(entry.data.imagePath); item->setImage(entry.data.imagePath);
item->applyTheme(theme, "system", "", ThemeFlags::ALL);
if (mImageBrightness != 0.0) if (mImageBrightness != 0.0)
item->setBrightness(mImageBrightness); item->setBrightness(mImageBrightness);
if (mImageSaturation != 1.0) if (mImageSaturation != 1.0)
@ -344,7 +343,6 @@ void CarouselComponent<T>::addEntry(Entry& entry, const std::shared_ptr<ThemeDat
glm::round(mItemSize * (mItemScale >= 1.0f ? mItemScale : 1.0f))); glm::round(mItemSize * (mItemScale >= 1.0f ? mItemScale : 1.0f)));
mDefaultImage->setCornerRadius(mImageCornerRadius); mDefaultImage->setCornerRadius(mImageCornerRadius);
mDefaultImage->setImage(entry.data.defaultImagePath); mDefaultImage->setImage(entry.data.defaultImagePath);
mDefaultImage->applyTheme(theme, "system", "", ThemeFlags::ALL);
if (mImageBrightness != 0.0) if (mImageBrightness != 0.0)
mDefaultImage->setBrightness(mImageBrightness); mDefaultImage->setBrightness(mImageBrightness);
if (mImageSaturation != 1.0) if (mImageSaturation != 1.0)
@ -419,7 +417,6 @@ void CarouselComponent<T>::updateEntry(Entry& entry, const std::shared_ptr<Theme
item->setCroppedSize(glm::round(mItemSize * (mItemScale >= 1.0f ? mItemScale : 1.0f))); item->setCroppedSize(glm::round(mItemSize * (mItemScale >= 1.0f ? mItemScale : 1.0f)));
item->setCornerRadius(mImageCornerRadius); item->setCornerRadius(mImageCornerRadius);
item->setImage(entry.data.imagePath); item->setImage(entry.data.imagePath);
item->applyTheme(theme, "system", "", ThemeFlags::ALL);
if (mImageBrightness != 0.0) if (mImageBrightness != 0.0)
item->setBrightness(mImageBrightness); item->setBrightness(mImageBrightness);
if (mImageSaturation != 1.0) if (mImageSaturation != 1.0)

View file

@ -312,7 +312,6 @@ void GridComponent<T>::addEntry(Entry& entry, const std::shared_ptr<ThemeData>&
item->setCroppedSize(mItemSize * mImageRelativeScale); item->setCroppedSize(mItemSize * mImageRelativeScale);
item->setCornerRadius(mImageCornerRadius); item->setCornerRadius(mImageCornerRadius);
item->setImage(entry.data.imagePath); item->setImage(entry.data.imagePath);
item->applyTheme(theme, "system", "", ThemeFlags::ALL);
if (mImageBrightness != 0.0) if (mImageBrightness != 0.0)
item->setBrightness(mImageBrightness); item->setBrightness(mImageBrightness);
if (mImageSaturation != 1.0) if (mImageSaturation != 1.0)
@ -345,7 +344,6 @@ void GridComponent<T>::addEntry(Entry& entry, const std::shared_ptr<ThemeData>&
mDefaultImage->setCroppedSize(mItemSize * mImageRelativeScale); mDefaultImage->setCroppedSize(mItemSize * mImageRelativeScale);
mDefaultImage->setCornerRadius(mImageCornerRadius); mDefaultImage->setCornerRadius(mImageCornerRadius);
mDefaultImage->setImage(entry.data.defaultImagePath); mDefaultImage->setImage(entry.data.defaultImagePath);
mDefaultImage->applyTheme(theme, "system", "", ThemeFlags::ALL);
if (mImageBrightness != 0.0) if (mImageBrightness != 0.0)
mDefaultImage->setBrightness(mImageBrightness); mDefaultImage->setBrightness(mImageBrightness);
if (mImageSaturation != 1.0) if (mImageSaturation != 1.0)
@ -403,7 +401,6 @@ void GridComponent<T>::updateEntry(Entry& entry, const std::shared_ptr<ThemeData
item->setCroppedSize(mItemSize * mImageRelativeScale); item->setCroppedSize(mItemSize * mImageRelativeScale);
item->setCornerRadius(mImageCornerRadius); item->setCornerRadius(mImageCornerRadius);
item->setImage(entry.data.imagePath); item->setImage(entry.data.imagePath);
item->applyTheme(theme, "system", "", ThemeFlags::ALL);
if (mImageBrightness != 0.0) if (mImageBrightness != 0.0)
item->setBrightness(mImageBrightness); item->setBrightness(mImageBrightness);
if (mImageSaturation != 1.0) if (mImageSaturation != 1.0)