1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Linux: Take global scale factor into account when setting peer scale factor

This commit is contained in:
ed 2019-04-18 14:15:42 +01:00
parent 38b24d7145
commit a45f05c1db

View file

@ -1202,7 +1202,7 @@ public:
auto& displays = Desktop::getInstance().getDisplays();
auto newScaleFactor = displays.findDisplayForRect (bounds, true).scale;
auto newScaleFactor = displays.findDisplayForRect (bounds, true).scale / Desktop::getInstance().getGlobalScaleFactor();
if (! approximatelyEqual (newScaleFactor, currentScaleFactor))
{
currentScaleFactor = newScaleFactor;
@ -2796,7 +2796,7 @@ private:
Rectangle<int> physicalBounds (wx, wy, (int) ww, (int) wh);
auto& displays = Desktop::getInstance().getDisplays();
auto newScaleFactor = displays.findDisplayForRect (physicalBounds, true).scale;
auto newScaleFactor = displays.findDisplayForRect (physicalBounds, true).scale / Desktop::getInstance().getGlobalScaleFactor();
if (! approximatelyEqual (newScaleFactor, currentScaleFactor))
{
currentScaleFactor = newScaleFactor;