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 committed Oct 14, 2024
1 parent 1b48004 commit c9910b8
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,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 c9910b8

Please sign in to comment.