diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2021-01-03 12:49:26 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2021-01-03 13:56:05 -0800 |
commit | 9beec46e22cbe53b011c10f204d56b3750a87edb (patch) | |
tree | 85b44d79e0da62adc27ad8265a0d68a3c1b59b21 /stats/legend.cpp | |
parent | b188560ae57304676fb10d8015dc2e3985e44c42 (diff) | |
download | subsurface-9beec46e22cbe53b011c10f204d56b3750a87edb.tar.gz |
statistics: use RoundRectItem for legend and info-box
Dirk says rounded corners look better. This now looks a bit
extreme to me and probably the border size should be increased.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'stats/legend.cpp')
-rw-r--r-- | stats/legend.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/stats/legend.cpp b/stats/legend.cpp index 457ce42f6..99340a8f9 100644 --- a/stats/legend.cpp +++ b/stats/legend.cpp @@ -10,13 +10,15 @@ static const double legendBorderSize = 2.0; static const double legendBoxBorderSize = 1.0; +static const double legendBoxBorderRadius = 4.0; // radius of rounded corners static const double legendBoxScale = 0.8; // 1.0: text-height of the used font static const double legendInternalBorderSize = 2.0; static const QColor legendColor(0x00, 0x8e, 0xcc, 192); // Note: fourth argument is opacity static const QColor legendBorderColor(Qt::black); Legend::Legend(QGraphicsWidget *chart, const std::vector<QString> &names) : - QGraphicsRectItem(chart), chart(chart), displayedItems(0), width(0.0), height(0.0) + RoundRectItem(legendBoxBorderRadius, chart), chart(chart), + displayedItems(0), width(0.0), height(0.0) { setZValue(ZValues::legend); entries.reserve(names.size()); |