Browse Source

Also scale intrinsic dimensions of the Lottie element by dp-ratio

Michael Ragazzon 1 month ago
parent
commit
174e1fe28a
1 changed files with 3 additions and 0 deletions
  1. 3 0
      Source/Lottie/ElementLottie.cpp

+ 3 - 0
Source/Lottie/ElementLottie.cpp

@@ -31,6 +31,7 @@
 #include "../../Include/RmlUi/Core/Context.h"
 #include "../../Include/RmlUi/Core/Context.h"
 #include "../../Include/RmlUi/Core/Core.h"
 #include "../../Include/RmlUi/Core/Core.h"
 #include "../../Include/RmlUi/Core/ElementDocument.h"
 #include "../../Include/RmlUi/Core/ElementDocument.h"
+#include "../../Include/RmlUi/Core/ElementUtilities.h"
 #include "../../Include/RmlUi/Core/FileInterface.h"
 #include "../../Include/RmlUi/Core/FileInterface.h"
 #include "../../Include/RmlUi/Core/MeshUtilities.h"
 #include "../../Include/RmlUi/Core/MeshUtilities.h"
 #include "../../Include/RmlUi/Core/PropertyIdSet.h"
 #include "../../Include/RmlUi/Core/PropertyIdSet.h"
@@ -53,6 +54,8 @@ bool ElementLottie::GetIntrinsicDimensions(Vector2f& dimensions, float& ratio)
 	if (dimensions.y > 0)
 	if (dimensions.y > 0)
 		ratio = dimensions.x / dimensions.y;
 		ratio = dimensions.x / dimensions.y;
 
 
+	dimensions *= ElementUtilities::GetDensityIndependentPixelRatio(this);
+
 	return true;
 	return true;
 }
 }