[ui]: use default control to count node dimensions

Follow-up: eb2b17173b3a86a506d2e1cc345ebd698d3a0697

GitOrigin-RevId: 86847261c22a2cf90511e424c08b264414514fc8
This commit is contained in:
Dmitry Zhuravlev
2022-10-18 00:23:34 +00:00
committed by intellij-monorepo-bot
parent d1d3b99a83
commit c2365b36c5
@@ -559,11 +559,7 @@ public class DefaultTreeUI extends BasicTreeUI {
}
if (size == null) return null;
TreePath path = tree.getPathForRow(row);
Control control = path != null ? getControl(tree, path) : myDefaultControl;
int x = getPainter(tree).getRendererOffset(control, depth + TreeUtil.getDepthOffset(tree), leaf);
int x = getPainter(tree).getRendererOffset(myDefaultControl, depth + TreeUtil.getDepthOffset(tree), leaf);
int height = getRowHeight();
if (height <= 0) height = size.height;
if (bounds == null) return new Rectangle(x, 0, size.width, height);