UI: TreeView Hierarchy Line with Region Zoom #117420
|
@ -164,9 +164,9 @@ void AbstractTreeView::draw_hierarchy_lines_recursive(const ARegion ®ion,
|
|||
|
||||
/* Small vertical padding. */
|
||||
const short line_padding = UI_UNIT_Y / 4.0f / aspect;
|
||||
const float x = first_child_rect.xmin +
|
||||
((first_descendant->indent_width() - (6.0f * UI_SCALE_FAC)) / aspect);
|
||||
|
||||
const float x = first_child_rect.xmin + ((first_descendant->indent_width() -
|
||||
(0.5f * UI_ICON_SIZE) + U.pixelsize + UI_SCALE_FAC) /
|
||||
Harley marked this conversation as resolved
Outdated
|
||||
aspect);
|
||||
immBegin(GPU_PRIM_LINES, 2);
|
||||
immVertex2f(pos, x, first_child_rect.ymax - line_padding);
|
||||
immVertex2f(pos, x, last_child_rect.ymin + line_padding);
|
||||
|
|
Loading…
Reference in New Issue
Why is this not using
UI_ICON_SIZE
anymore? Now the position seems rather arbitrary, before it was more clear that it's centered horizontally under the icon. In general such arbitrary factors should be avoided since they say nothing, positioning should be based on known/named dimensions so intended visual relations are clear in code.No worries, changed to be based on half the icon width and line width nudges.