mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-03-06 14:27:43 +00:00
Changed a number of theme properties to be read by reference instead of via copy.
This commit is contained in:
parent
cfd2f7e4e5
commit
246fd307b6
|
@ -291,7 +291,7 @@ void BadgeComponent::applyTheme(const std::shared_ptr<ThemeData>& theme,
|
||||||
|
|
||||||
if (elem->has("slots")) {
|
if (elem->has("slots")) {
|
||||||
// Replace possible whitespace separators with commas.
|
// Replace possible whitespace separators with commas.
|
||||||
std::string slotsTag = Utils::String::toLower(elem->get<std::string>("slots"));
|
std::string slotsTag {Utils::String::toLower(elem->get<std::string>("slots"))};
|
||||||
for (auto& character : slotsTag) {
|
for (auto& character : slotsTag) {
|
||||||
if (std::isspace(character))
|
if (std::isspace(character))
|
||||||
character = ',';
|
character = ',';
|
||||||
|
@ -312,7 +312,7 @@ void BadgeComponent::applyTheme(const std::shared_ptr<ThemeData>& theme,
|
||||||
// The "badge_" string is required as ThemeData adds this as a prefix to avoid
|
// The "badge_" string is required as ThemeData adds this as a prefix to avoid
|
||||||
// name collisions when using XML attributes.
|
// name collisions when using XML attributes.
|
||||||
if (properties & PATH && elem->has("badge_" + slot)) {
|
if (properties & PATH && elem->has("badge_" + slot)) {
|
||||||
const std::string path {elem->get<std::string>("badge_" + slot)};
|
const std::string& path {elem->get<std::string>("badge_" + slot)};
|
||||||
if (Utils::FileSystem::exists(path) && !Utils::FileSystem::isDirectory(path)) {
|
if (Utils::FileSystem::exists(path) && !Utils::FileSystem::isDirectory(path)) {
|
||||||
mBadgeIcons[slot] = path;
|
mBadgeIcons[slot] = path;
|
||||||
}
|
}
|
||||||
|
@ -385,7 +385,7 @@ void BadgeComponent::applyTheme(const std::shared_ptr<ThemeData>& theme,
|
||||||
|
|
||||||
for (auto& gameController : sGameControllers) {
|
for (auto& gameController : sGameControllers) {
|
||||||
if (properties & PATH && elem->has("controller_" + gameController.shortName)) {
|
if (properties & PATH && elem->has("controller_" + gameController.shortName)) {
|
||||||
const std::string path {
|
const std::string& path {
|
||||||
elem->get<std::string>("controller_" + gameController.shortName)};
|
elem->get<std::string>("controller_" + gameController.shortName)};
|
||||||
if (Utils::FileSystem::exists(path) && !Utils::FileSystem::isDirectory(path)) {
|
if (Utils::FileSystem::exists(path) && !Utils::FileSystem::isDirectory(path)) {
|
||||||
gameController.fileName = path;
|
gameController.fileName = path;
|
||||||
|
|
|
@ -130,51 +130,51 @@ void DateTimeComponent::applyTheme(const std::shared_ptr<ThemeData>& theme,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (properties & ALIGNMENT && elem->has("horizontalAlignment")) {
|
if (properties & ALIGNMENT && elem->has("horizontalAlignment")) {
|
||||||
std::string str {elem->get<std::string>("horizontalAlignment")};
|
const std::string& horizontalAlignment {elem->get<std::string>("horizontalAlignment")};
|
||||||
if (str == "left")
|
if (horizontalAlignment == "left")
|
||||||
setHorizontalAlignment(ALIGN_LEFT);
|
setHorizontalAlignment(ALIGN_LEFT);
|
||||||
else if (str == "center")
|
else if (horizontalAlignment == "center")
|
||||||
setHorizontalAlignment(ALIGN_CENTER);
|
setHorizontalAlignment(ALIGN_CENTER);
|
||||||
else if (str == "right")
|
else if (horizontalAlignment == "right")
|
||||||
setHorizontalAlignment(ALIGN_RIGHT);
|
setHorizontalAlignment(ALIGN_RIGHT);
|
||||||
else
|
else
|
||||||
LOG(LogWarning) << "DateTimeComponent: Invalid theme configuration, property "
|
LOG(LogWarning) << "DateTimeComponent: Invalid theme configuration, property "
|
||||||
"<horizontalAlignment> defined as \""
|
"<horizontalAlignment> defined as \""
|
||||||
<< str << "\"";
|
<< horizontalAlignment << "\"";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (properties & ALIGNMENT && elem->has("verticalAlignment")) {
|
if (properties & ALIGNMENT && elem->has("verticalAlignment")) {
|
||||||
std::string str {elem->get<std::string>("verticalAlignment")};
|
const std::string& verticalAlignment {elem->get<std::string>("verticalAlignment")};
|
||||||
if (str == "top")
|
if (verticalAlignment == "top")
|
||||||
setVerticalAlignment(ALIGN_TOP);
|
setVerticalAlignment(ALIGN_TOP);
|
||||||
else if (str == "center")
|
else if (verticalAlignment == "center")
|
||||||
setVerticalAlignment(ALIGN_CENTER);
|
setVerticalAlignment(ALIGN_CENTER);
|
||||||
else if (str == "bottom")
|
else if (verticalAlignment == "bottom")
|
||||||
setVerticalAlignment(ALIGN_BOTTOM);
|
setVerticalAlignment(ALIGN_BOTTOM);
|
||||||
else
|
else
|
||||||
LOG(LogWarning) << "DateTimeComponent: Invalid theme configuration, property "
|
LOG(LogWarning) << "DateTimeComponent: Invalid theme configuration, property "
|
||||||
"<verticalAlignment> defined as \""
|
"<verticalAlignment> defined as \""
|
||||||
<< str << "\"";
|
<< verticalAlignment << "\"";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Legacy themes only.
|
// Legacy themes only.
|
||||||
if (properties & ALIGNMENT && elem->has("alignment")) {
|
if (properties & ALIGNMENT && elem->has("alignment")) {
|
||||||
std::string str {elem->get<std::string>("alignment")};
|
const std::string& alignment {elem->get<std::string>("alignment")};
|
||||||
if (str == "left")
|
if (alignment == "left")
|
||||||
setHorizontalAlignment(ALIGN_LEFT);
|
setHorizontalAlignment(ALIGN_LEFT);
|
||||||
else if (str == "center")
|
else if (alignment == "center")
|
||||||
setHorizontalAlignment(ALIGN_CENTER);
|
setHorizontalAlignment(ALIGN_CENTER);
|
||||||
else if (str == "right")
|
else if (alignment == "right")
|
||||||
setHorizontalAlignment(ALIGN_RIGHT);
|
setHorizontalAlignment(ALIGN_RIGHT);
|
||||||
else
|
else
|
||||||
LOG(LogWarning) << "DateTimeComponent: Invalid theme configuration, property "
|
LOG(LogWarning) << "DateTimeComponent: Invalid theme configuration, property "
|
||||||
"<alignment> defined as \""
|
"<alignment> defined as \""
|
||||||
<< str << "\"";
|
<< alignment << "\"";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (properties & METADATA && elem->has("metadata")) {
|
if (properties & METADATA && elem->has("metadata")) {
|
||||||
mThemeMetadata = "";
|
mThemeMetadata = "";
|
||||||
const std::string metadata {elem->get<std::string>("metadata")};
|
const std::string& metadata {elem->get<std::string>("metadata")};
|
||||||
if (metadata == "releasedate" || metadata == "lastplayed") {
|
if (metadata == "releasedate" || metadata == "lastplayed") {
|
||||||
mThemeMetadata = metadata;
|
mThemeMetadata = metadata;
|
||||||
}
|
}
|
||||||
|
@ -192,7 +192,7 @@ void DateTimeComponent::applyTheme(const std::shared_ptr<ThemeData>& theme,
|
||||||
setDisplayRelative(elem->get<bool>("displayRelative"));
|
setDisplayRelative(elem->get<bool>("displayRelative"));
|
||||||
|
|
||||||
if (properties & LETTER_CASE && elem->has("letterCase")) {
|
if (properties & LETTER_CASE && elem->has("letterCase")) {
|
||||||
std::string letterCase {elem->get<std::string>("letterCase")};
|
const std::string& letterCase {elem->get<std::string>("letterCase")};
|
||||||
if (letterCase == "uppercase") {
|
if (letterCase == "uppercase") {
|
||||||
setUppercase(true);
|
setUppercase(true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -286,7 +286,7 @@ void GIFAnimComponent::applyTheme(const std::shared_ptr<ThemeData>& theme,
|
||||||
mKeepAspectRatio = elem->get<bool>("keepAspectRatio");
|
mKeepAspectRatio = elem->get<bool>("keepAspectRatio");
|
||||||
|
|
||||||
if (elem->has("direction")) {
|
if (elem->has("direction")) {
|
||||||
std::string direction = elem->get<std::string>("direction");
|
const std::string& direction {elem->get<std::string>("direction")};
|
||||||
if (direction == "normal") {
|
if (direction == "normal") {
|
||||||
mStartDirection = "normal";
|
mStartDirection = "normal";
|
||||||
mAlternate = false;
|
mAlternate = false;
|
||||||
|
@ -313,7 +313,7 @@ void GIFAnimComponent::applyTheme(const std::shared_ptr<ThemeData>& theme,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (elem->has("interpolation")) {
|
if (elem->has("interpolation")) {
|
||||||
const std::string interpolation {elem->get<std::string>("interpolation")};
|
const std::string& interpolation {elem->get<std::string>("interpolation")};
|
||||||
if (interpolation == "linear") {
|
if (interpolation == "linear") {
|
||||||
mTexture->setLinearMagnify(true);
|
mTexture->setLinearMagnify(true);
|
||||||
}
|
}
|
||||||
|
@ -332,7 +332,7 @@ void GIFAnimComponent::applyTheme(const std::shared_ptr<ThemeData>& theme,
|
||||||
GuiComponent::applyTheme(theme, view, element, properties);
|
GuiComponent::applyTheme(theme, view, element, properties);
|
||||||
|
|
||||||
if (elem->has("path")) {
|
if (elem->has("path")) {
|
||||||
std::string path {elem->get<std::string>("path")};
|
const std::string& path {elem->get<std::string>("path")};
|
||||||
if (path != "") {
|
if (path != "") {
|
||||||
setAnimation(path);
|
setAnimation(path);
|
||||||
}
|
}
|
||||||
|
|
|
@ -123,7 +123,7 @@ public:
|
||||||
mSelectorName = element.substr(13, std::string::npos);
|
mSelectorName = element.substr(13, std::string::npos);
|
||||||
|
|
||||||
if (elem->has("selection")) {
|
if (elem->has("selection")) {
|
||||||
const std::string selection {elem->get<std::string>("selection")};
|
const std::string& selection {elem->get<std::string>("selection")};
|
||||||
if (selection == "random") {
|
if (selection == "random") {
|
||||||
mGameSelection = GameSelection::RANDOM;
|
mGameSelection = GameSelection::RANDOM;
|
||||||
}
|
}
|
||||||
|
@ -140,8 +140,8 @@ public:
|
||||||
else {
|
else {
|
||||||
mGameSelection = GameSelection::RANDOM;
|
mGameSelection = GameSelection::RANDOM;
|
||||||
LOG(LogWarning) << "GameSelectorComponent: Invalid theme configuration, property "
|
LOG(LogWarning) << "GameSelectorComponent: Invalid theme configuration, property "
|
||||||
"<selection> defined as \""
|
"\"selection\" for element \""
|
||||||
<< selection << "\"";
|
<< element.substr(13) << "\" defined as \"" << selection << "\"";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -433,7 +433,7 @@ void ImageComponent::applyTheme(const std::shared_ptr<ThemeData>& theme,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (elem->has("interpolation")) {
|
if (elem->has("interpolation")) {
|
||||||
const std::string interpolation {elem->get<std::string>("interpolation")};
|
const std::string& interpolation {elem->get<std::string>("interpolation")};
|
||||||
if (interpolation == "linear") {
|
if (interpolation == "linear") {
|
||||||
mLinearInterpolation = true;
|
mLinearInterpolation = true;
|
||||||
}
|
}
|
||||||
|
@ -454,7 +454,7 @@ void ImageComponent::applyTheme(const std::shared_ptr<ThemeData>& theme,
|
||||||
bool tile {elem->has("tile") && elem->get<bool>("tile")};
|
bool tile {elem->has("tile") && elem->get<bool>("tile")};
|
||||||
|
|
||||||
if (properties & PATH && elem->has("path")) {
|
if (properties & PATH && elem->has("path")) {
|
||||||
const std::string path {elem->get<std::string>("path")};
|
const std::string& path {elem->get<std::string>("path")};
|
||||||
|
|
||||||
if (tile && elem->has("tileSize")) {
|
if (tile && elem->has("tileSize")) {
|
||||||
glm::vec2 tileSize {elem->get<glm::vec2>("tileSize")};
|
glm::vec2 tileSize {elem->get<glm::vec2>("tileSize")};
|
||||||
|
@ -479,7 +479,7 @@ void ImageComponent::applyTheme(const std::shared_ptr<ThemeData>& theme,
|
||||||
bool updateAlignment {false};
|
bool updateAlignment {false};
|
||||||
|
|
||||||
if (elem->has("tileHorizontalAlignment")) {
|
if (elem->has("tileHorizontalAlignment")) {
|
||||||
const std::string alignment {elem->get<std::string>("tileHorizontalAlignment")};
|
const std::string& alignment {elem->get<std::string>("tileHorizontalAlignment")};
|
||||||
updateAlignment = true;
|
updateAlignment = true;
|
||||||
if (alignment == "left") {
|
if (alignment == "left") {
|
||||||
mTileHorizontalAlignment = ALIGN_LEFT;
|
mTileHorizontalAlignment = ALIGN_LEFT;
|
||||||
|
@ -496,7 +496,7 @@ void ImageComponent::applyTheme(const std::shared_ptr<ThemeData>& theme,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (elem->has("tileVerticalAlignment")) {
|
if (elem->has("tileVerticalAlignment")) {
|
||||||
const std::string alignment {elem->get<std::string>("tileVerticalAlignment")};
|
const std::string& alignment {elem->get<std::string>("tileVerticalAlignment")};
|
||||||
updateAlignment = true;
|
updateAlignment = true;
|
||||||
if (alignment == "top") {
|
if (alignment == "top") {
|
||||||
mTileVerticalAlignment = ALIGN_TOP;
|
mTileVerticalAlignment = ALIGN_TOP;
|
||||||
|
|
|
@ -256,7 +256,7 @@ void LottieAnimComponent::applyTheme(const std::shared_ptr<ThemeData>& theme,
|
||||||
mKeepAspectRatio = elem->get<bool>("keepAspectRatio");
|
mKeepAspectRatio = elem->get<bool>("keepAspectRatio");
|
||||||
|
|
||||||
if (elem->has("direction")) {
|
if (elem->has("direction")) {
|
||||||
std::string direction = elem->get<std::string>("direction");
|
const std::string& direction {elem->get<std::string>("direction")};
|
||||||
if (direction == "normal") {
|
if (direction == "normal") {
|
||||||
mStartDirection = "normal";
|
mStartDirection = "normal";
|
||||||
mAlternate = false;
|
mAlternate = false;
|
||||||
|
|
|
@ -180,7 +180,7 @@ void RatingComponent::applyTheme(const std::shared_ptr<ThemeData>& theme,
|
||||||
// Read the image file in order to retrieve the image dimensions needed to calculate
|
// Read the image file in order to retrieve the image dimensions needed to calculate
|
||||||
// the aspect ratio constant.
|
// the aspect ratio constant.
|
||||||
if (properties & PATH && elem->has("filledPath")) {
|
if (properties & PATH && elem->has("filledPath")) {
|
||||||
std::string path {std::string(elem->get<std::string>("filledPath"))};
|
const std::string& path {std::string(elem->get<std::string>("filledPath"))};
|
||||||
if (Utils::FileSystem::isRegularFile(path) || Utils::FileSystem::isSymlink(path)) {
|
if (Utils::FileSystem::isRegularFile(path) || Utils::FileSystem::isSymlink(path)) {
|
||||||
auto tempImage =
|
auto tempImage =
|
||||||
TextureResource::get(path, false, false, false, false, false, 0, 0, 0.0f, 0.0f);
|
TextureResource::get(path, false, false, false, false, false, 0, 0, 0.0f, 0.0f);
|
||||||
|
@ -212,7 +212,7 @@ void RatingComponent::applyTheme(const std::shared_ptr<ThemeData>& theme,
|
||||||
bool linearInterpolation {false};
|
bool linearInterpolation {false};
|
||||||
|
|
||||||
if (elem->has("interpolation")) {
|
if (elem->has("interpolation")) {
|
||||||
const std::string interpolation {elem->get<std::string>("interpolation")};
|
const std::string& interpolation {elem->get<std::string>("interpolation")};
|
||||||
if (interpolation == "linear") {
|
if (interpolation == "linear") {
|
||||||
linearInterpolation = true;
|
linearInterpolation = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -378,49 +378,49 @@ void TextComponent::applyTheme(const std::shared_ptr<ThemeData>& theme,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (properties & ALIGNMENT && elem->has("horizontalAlignment")) {
|
if (properties & ALIGNMENT && elem->has("horizontalAlignment")) {
|
||||||
std::string str {elem->get<std::string>("horizontalAlignment")};
|
const std::string& horizontalAlignment {elem->get<std::string>("horizontalAlignment")};
|
||||||
if (str == "left")
|
if (horizontalAlignment == "left")
|
||||||
setHorizontalAlignment(ALIGN_LEFT);
|
setHorizontalAlignment(ALIGN_LEFT);
|
||||||
else if (str == "center")
|
else if (horizontalAlignment == "center")
|
||||||
setHorizontalAlignment(ALIGN_CENTER);
|
setHorizontalAlignment(ALIGN_CENTER);
|
||||||
else if (str == "right")
|
else if (horizontalAlignment == "right")
|
||||||
setHorizontalAlignment(ALIGN_RIGHT);
|
setHorizontalAlignment(ALIGN_RIGHT);
|
||||||
else
|
else
|
||||||
LOG(LogWarning) << componentName
|
LOG(LogWarning) << componentName
|
||||||
<< ": Invalid theme configuration, property "
|
<< ": Invalid theme configuration, property "
|
||||||
"<horizontalAlignment> defined as \""
|
"<horizontalAlignment> defined as \""
|
||||||
<< str << "\"";
|
<< horizontalAlignment << "\"";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (properties & ALIGNMENT && elem->has("verticalAlignment")) {
|
if (properties & ALIGNMENT && elem->has("verticalAlignment")) {
|
||||||
std::string str {elem->get<std::string>("verticalAlignment")};
|
const std::string& verticalAlignment {elem->get<std::string>("verticalAlignment")};
|
||||||
if (str == "top")
|
if (verticalAlignment == "top")
|
||||||
setVerticalAlignment(ALIGN_TOP);
|
setVerticalAlignment(ALIGN_TOP);
|
||||||
else if (str == "center")
|
else if (verticalAlignment == "center")
|
||||||
setVerticalAlignment(ALIGN_CENTER);
|
setVerticalAlignment(ALIGN_CENTER);
|
||||||
else if (str == "bottom")
|
else if (verticalAlignment == "bottom")
|
||||||
setVerticalAlignment(ALIGN_BOTTOM);
|
setVerticalAlignment(ALIGN_BOTTOM);
|
||||||
else
|
else
|
||||||
LOG(LogWarning) << componentName
|
LOG(LogWarning) << componentName
|
||||||
<< ": Invalid theme configuration, property "
|
<< ": Invalid theme configuration, property "
|
||||||
"<verticalAlignment> defined as \""
|
"<verticalAlignment> defined as \""
|
||||||
<< str << "\"";
|
<< verticalAlignment << "\"";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Legacy themes only.
|
// Legacy themes only.
|
||||||
if (properties & ALIGNMENT && elem->has("alignment")) {
|
if (properties & ALIGNMENT && elem->has("alignment")) {
|
||||||
std::string str {elem->get<std::string>("alignment")};
|
const std::string& alignment {elem->get<std::string>("alignment")};
|
||||||
if (str == "left")
|
if (alignment == "left")
|
||||||
setHorizontalAlignment(ALIGN_LEFT);
|
setHorizontalAlignment(ALIGN_LEFT);
|
||||||
else if (str == "center")
|
else if (alignment == "center")
|
||||||
setHorizontalAlignment(ALIGN_CENTER);
|
setHorizontalAlignment(ALIGN_CENTER);
|
||||||
else if (str == "right")
|
else if (alignment == "right")
|
||||||
setHorizontalAlignment(ALIGN_RIGHT);
|
setHorizontalAlignment(ALIGN_RIGHT);
|
||||||
else
|
else
|
||||||
LOG(LogWarning) << componentName
|
LOG(LogWarning) << componentName
|
||||||
<< ": Invalid theme configuration, property "
|
<< ": Invalid theme configuration, property "
|
||||||
"<alignment> defined as \""
|
"<alignment> defined as \""
|
||||||
<< str << "\"";
|
<< alignment << "\"";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (properties & TEXT && elem->has("text"))
|
if (properties & TEXT && elem->has("text"))
|
||||||
|
@ -428,7 +428,7 @@ void TextComponent::applyTheme(const std::shared_ptr<ThemeData>& theme,
|
||||||
|
|
||||||
if (properties & METADATA && elem->has("systemdata")) {
|
if (properties & METADATA && elem->has("systemdata")) {
|
||||||
mThemeSystemdata = "";
|
mThemeSystemdata = "";
|
||||||
const std::string systemdata {elem->get<std::string>("systemdata")};
|
const std::string& systemdata {elem->get<std::string>("systemdata")};
|
||||||
for (auto& type : supportedSystemdataTypes) {
|
for (auto& type : supportedSystemdataTypes) {
|
||||||
if (type == systemdata) {
|
if (type == systemdata) {
|
||||||
mThemeSystemdata = type;
|
mThemeSystemdata = type;
|
||||||
|
@ -444,7 +444,7 @@ void TextComponent::applyTheme(const std::shared_ptr<ThemeData>& theme,
|
||||||
|
|
||||||
if (properties & METADATA && elem->has("metadata")) {
|
if (properties & METADATA && elem->has("metadata")) {
|
||||||
mThemeMetadata = "";
|
mThemeMetadata = "";
|
||||||
const std::string metadata {elem->get<std::string>("metadata")};
|
const std::string& metadata {elem->get<std::string>("metadata")};
|
||||||
|
|
||||||
for (auto& type : supportedMetadataTypes) {
|
for (auto& type : supportedMetadataTypes) {
|
||||||
if (type == metadata) {
|
if (type == metadata) {
|
||||||
|
@ -460,7 +460,7 @@ void TextComponent::applyTheme(const std::shared_ptr<ThemeData>& theme,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (properties & LETTER_CASE && elem->has("letterCase")) {
|
if (properties & LETTER_CASE && elem->has("letterCase")) {
|
||||||
std::string letterCase {elem->get<std::string>("letterCase")};
|
const std::string& letterCase {elem->get<std::string>("letterCase")};
|
||||||
if (letterCase == "uppercase") {
|
if (letterCase == "uppercase") {
|
||||||
setUppercase(true);
|
setUppercase(true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -155,7 +155,7 @@ void VideoComponent::applyTheme(const std::shared_ptr<ThemeData>& theme,
|
||||||
mPlayAudio = elem->get<bool>("audio");
|
mPlayAudio = elem->get<bool>("audio");
|
||||||
|
|
||||||
if (elem->has("interpolation")) {
|
if (elem->has("interpolation")) {
|
||||||
const std::string interpolation {elem->get<std::string>("interpolation")};
|
const std::string& interpolation {elem->get<std::string>("interpolation")};
|
||||||
if (interpolation == "linear") {
|
if (interpolation == "linear") {
|
||||||
mStaticImage.setLinearInterpolation(true);
|
mStaticImage.setLinearInterpolation(true);
|
||||||
}
|
}
|
||||||
|
@ -189,7 +189,7 @@ void VideoComponent::applyTheme(const std::shared_ptr<ThemeData>& theme,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (elem->has("path")) {
|
if (elem->has("path")) {
|
||||||
const std::string staticPath {elem->get<std::string>("path")};
|
const std::string& staticPath {elem->get<std::string>("path")};
|
||||||
if (ResourceManager::getInstance().fileExists(staticPath)) {
|
if (ResourceManager::getInstance().fileExists(staticPath)) {
|
||||||
mConfig.staticVideoPath = staticPath;
|
mConfig.staticVideoPath = staticPath;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue