Skip to content

Commit

Permalink
Expand Bar is not scaled during DPI change
Browse files Browse the repository at this point in the history
When moving from one zoom level monitor to another zoom level (no matter
what %), The images, expanded items and texts are not drawn at correct
coordinates.
  • Loading branch information
ShahzaibIbrahim authored and HeikoKlare committed Nov 5, 2024
1 parent df66a8b commit 91058da
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,8 @@ private static void handleDPIChange(Widget widget, int newZoom, float scalingFac
if (item.height != 0 || item.width != 0) {
int newWidth = Math.round(item.width * scalingFactor);
int newHeight = Math.round(item.height * scalingFactor);
item.setBoundsInPixels(item.x, item.y, newWidth, newHeight, false, true);
item.setBoundsInPixels(item.x, item.y, newWidth, newHeight, true, true);
item.parent.layoutItems(0, true);
}
}
}

0 comments on commit 91058da

Please sign in to comment.