Skip to content

Commit

Permalink
Merge pull request #53 from LorenDB/kdchart-3.0
Browse files Browse the repository at this point in the history
Add spacing to legend text
  • Loading branch information
dfaure-kdab authored Dec 17, 2024
2 parents e1a206f + be50a51 commit 7b39f94
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/KDChart/KDChartLegend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1051,6 +1051,7 @@ void Legend::Private::flowHDatasetItems(Legend *q)
const int allowedWidth = q->areaGeometry().width();

auto *currentLine = new QHBoxLayout;
currentLine->setSpacing(3);
int mainLayoutRow = 1;
layout->addItem(currentLine, mainLayoutRow++, /*column*/ 0,
/*rowSpan*/ 1, /*columnSpan*/ 5, Qt::AlignLeft | Qt::AlignVCenter);
Expand All @@ -1072,6 +1073,7 @@ void Legend::Private::flowHDatasetItems(Legend *q)
<< allowedWidth;
#endif
currentLine = new QHBoxLayout;
currentLine->setSpacing(3);
layout->addItem(currentLine, mainLayoutRow++, /*column*/ 0,
/*rowSpan*/ 1, /*columnSpan*/ 5, Qt::AlignLeft | Qt::AlignVCenter);
} else {
Expand Down

0 comments on commit 7b39f94

Please sign in to comment.