mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-12-01 15:53:26 -10:00
Fix Layers panel node chains (ellip)sizing incorrectly with fractional UI scales in Chromium (#4813)
Fix layer chain overflow at fractional UI scales
This commit is contained in:
1 parent
c48cb4c7c9
commit
4aa3ba34ea
1 file changed
+2
-1
@@ -156,7 +156,8 @@
|
||||
const chainResizeObserver = new ResizeObserver((entries) => {
|
||||
entries.forEach((entry) => {
|
||||
const rowIndex = Number(entry.target.closest("[data-layer]")?.getAttribute("data-index"));
|
||||
if (!Number.isNaN(rowIndex)) chainWidths[rowIndex] = entry.contentRect.width;
|
||||
// Rounded to avoid issue for fractional device pixel ratio
|
||||
if (!Number.isNaN(rowIndex)) chainWidths[rowIndex] = Math.round(entry.contentRect.width);
|
||||
});
|
||||
chainWidths = chainWidths;
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user