mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-29 19:55:37 +00:00
Removed some deprecated theme engine code.
This commit is contained in:
parent
941fa013b6
commit
e8a093c19c
|
@ -176,9 +176,6 @@ void GamelistView::onThemeChanged(const std::shared_ptr<ThemeData>& theme)
|
|||
mCarousel = std::make_unique<CarouselComponent<FileData*>>();
|
||||
if (element.second.has("defaultImage"))
|
||||
mCarousel->setDefaultImage(element.second.get<std::string>("defaultImage"));
|
||||
// TEMPORARY: Backward compatiblity due to property name changes.
|
||||
if (element.second.has("defaultItem"))
|
||||
mCarousel->setDefaultImage(element.second.get<std::string>("defaultItem"));
|
||||
mPrimary = mCarousel.get();
|
||||
}
|
||||
mPrimary->setCursorChangedCallback(
|
||||
|
|
|
@ -575,14 +575,6 @@ void SystemView::populate()
|
|||
}
|
||||
});
|
||||
if (mCarousel != nullptr || mGrid != nullptr) {
|
||||
if (mCarousel != nullptr) {
|
||||
// TEMPORARY: Backward compatiblity due to property name changes.
|
||||
if (element.second.has("staticItem"))
|
||||
imagePath = element.second.get<std::string>("staticItem");
|
||||
if (element.second.has("defaultItem"))
|
||||
defaultImagePath =
|
||||
element.second.get<std::string>("defaultItem");
|
||||
}
|
||||
if (element.second.has("staticImage"))
|
||||
imagePath = element.second.get<std::string>("staticImage");
|
||||
if (element.second.has("defaultImage"))
|
||||
|
|
|
@ -798,17 +798,11 @@ void GridComponent<T>::applyTheme(const std::shared_ptr<ThemeData>& theme,
|
|||
if (!elem)
|
||||
return;
|
||||
|
||||
// TEMPORARY: Support for itemType is for backward compatiblity due to property name changes.
|
||||
if (mGamelistView && properties && (elem->has("imageType") || elem->has("itemType"))) {
|
||||
if (mGamelistView && properties && elem->has("imageType")) {
|
||||
const std::vector<std::string> supportedImageTypes {
|
||||
"marquee", "cover", "backcover", "3dbox", "physicalmedia",
|
||||
"screenshot", "titlescreen", "miximage", "fanart", "none"};
|
||||
std::string imageTypesString;
|
||||
|
||||
if (elem->has("imageType"))
|
||||
imageTypesString = elem->get<std::string>("imageType");
|
||||
else
|
||||
imageTypesString = elem->get<std::string>("itemType");
|
||||
std::string imageTypesString {elem->get<std::string>("imageType")};
|
||||
|
||||
for (auto& character : imageTypesString) {
|
||||
if (std::isspace(character))
|
||||
|
|
|
@ -685,7 +685,6 @@ void TextListComponent<T>::applyTheme(const std::shared_ptr<ThemeData>& theme,
|
|||
glm::clamp(elem->get<float>("selectorVerticalOffset"), -1.0f, 1.0f) * scale;
|
||||
}
|
||||
else if (elem->has("selectorOffsetY")) {
|
||||
// TEMPORARY: This property will only be usable for legacy themes as of 2.0.0-beta
|
||||
const float scale {this->mParent ? this->mParent->getSize().y :
|
||||
Renderer::getScreenHeight()};
|
||||
mSelectorVerticalOffset =
|
||||
|
|
Loading…
Reference in a new issue