Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix line alignment in the tech tree #1105

Merged
merged 1 commit into from
Jul 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions client/reqtree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1128,13 +1128,15 @@ QList<req_tooltip_help *> *draw_reqtree(struct reqtree *tree,

// Draw all outgoing edges
startx = node->node_x + node->node_width;
starty = node->node_y + node->node_height / 2;
// -1 for pen half-width
starty = node->node_y + node->node_height / 2 - 1;
for (k = 0; k < node->nprovide; k++) {
struct tree_node *dest_node = node->provide[k];
p.setPen(QPen(edge_color(node, dest_node), 2));

endx = dest_node->node_x;
endy = dest_node->node_y + dest_node->node_height / 2;
// -1 for pen half-width
endy = dest_node->node_y + dest_node->node_height / 2 - 1;

if (gui_options.reqtree_curved_lines) {
QPainterPath path;
Expand Down