diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2015-01-16 17:17:55 -0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-01-17 08:54:00 +1300 |
commit | d2c5770ae14a79ee124959f20b01161da52c62c2 (patch) | |
tree | f262a1fdb82c36624a16b9f7df548711bd23a627 /qt-ui/profile | |
parent | a6e95511a681043907c2718b19d9d9023af173a9 (diff) | |
download | subsurface-d2c5770ae14a79ee124959f20b01161da52c62c2.tar.gz |
Fix the colors - brush wasn't being set anymore.
Also a bit of code cleanup.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile')
-rw-r--r-- | qt-ui/profile/divetextitem.cpp | 5 | ||||
-rw-r--r-- | qt-ui/profile/divetextitem.h | 2 |
2 files changed, 1 insertions, 6 deletions
diff --git a/qt-ui/profile/divetextitem.cpp b/qt-ui/profile/divetextitem.cpp index ddaf6efb2..24f9d6b25 100644 --- a/qt-ui/profile/divetextitem.cpp +++ b/qt-ui/profile/divetextitem.cpp @@ -14,13 +14,11 @@ DiveTextItem::DiveTextItem(QGraphicsItem *parent) : QGraphicsItemGroup(parent), internalAlignFlags(Qt::AlignHCenter | Qt::AlignVCenter), textBackgroundItem(new QGraphicsPathItem(this)), textItem(new QGraphicsPathItem(this)), - colorIndex(SAC_DEFAULT), scale(1.0) { setFlag(ItemIgnoresTransformations); textBackgroundItem->setBrush(QBrush(getColor(TEXT_BACKGROUND))); textBackgroundItem->setPen(Qt::NoPen); - textItem->setBrush(brush); textItem->setPen(Qt::NoPen); } @@ -32,8 +30,7 @@ void DiveTextItem::setAlignment(int alignFlags) void DiveTextItem::setBrush(const QBrush &b) { - brush = b; - updateText(); + textItem->setBrush(b); } void DiveTextItem::setScale(double newscale) diff --git a/qt-ui/profile/divetextitem.h b/qt-ui/profile/divetextitem.h index a6c0622f8..0c0ec4b86 100644 --- a/qt-ui/profile/divetextitem.h +++ b/qt-ui/profile/divetextitem.h @@ -25,8 +25,6 @@ private: QGraphicsPathItem *textBackgroundItem; QGraphicsPathItem *textItem; QString internalText; - color_indice_t colorIndex; - QBrush brush; double scale; }; |