summaryrefslogtreecommitdiffstats
path: root/stats/informationbox.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2021-01-03 12:49:26 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2021-01-03 13:56:05 -0800
commit9beec46e22cbe53b011c10f204d56b3750a87edb (patch)
tree85b44d79e0da62adc27ad8265a0d68a3c1b59b21 /stats/informationbox.cpp
parentb188560ae57304676fb10d8015dc2e3985e44c42 (diff)
downloadsubsurface-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/informationbox.cpp')
-rw-r--r--stats/informationbox.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/stats/informationbox.cpp b/stats/informationbox.cpp
index 015f821be..706035f93 100644
--- a/stats/informationbox.cpp
+++ b/stats/informationbox.cpp
@@ -8,9 +8,10 @@
static const QColor informationBorderColor(Qt::black);
static const QColor informationColor(0xff, 0xff, 0x00, 192); // Note: fourth argument is opacity
static const int informationBorder = 2;
+static const double informationBorderRadius = 4.0; // Radius of rounded corners
static const int distanceFromPointer = 10; // Distance to place box from mouse pointer or scatter item
-InformationBox::InformationBox(QtCharts::QChart *chart) : QGraphicsRectItem(chart), chart(chart)
+InformationBox::InformationBox(QtCharts::QChart *chart) : RoundRectItem(informationBorderRadius, chart), chart(chart)
{
setPen(QPen(informationBorderColor, informationBorder));
setBrush(informationColor);