Fix the padding in SimpleTextGraphView (#3046)

This commit is contained in:
Duncan Ogilvie 2022-10-25 12:16:48 +02:00 committed by GitHub
parent 3224daa0ee
commit 1ac814c1b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -119,8 +119,8 @@ void SimpleTextGraphView::drawBlock(QPainter &p, GraphView::GraphBlock &block, b
p.setPen(palette().color(QPalette::WindowText));
// Render node text
auto x = block.x + padding;
int y = block.y + padding + p.fontMetrics().ascent();
auto x = block.x + padding / 2;
int y = block.y + padding / 2 + p.fontMetrics().ascent();
p.drawText(QPoint(x, y), content.text);
}