[PATCH] Profile2: fix widths on some lines for Qt5
Lubomir I. Ivanov
neolit123 at gmail.com
Wed Mar 19 09:24:42 PDT 2014
From: "Lubomir I. Ivanov" <neolit123 at gmail.com>
Qt5 uses different widths for some of the poly. lines
in the profile. Setting an explicit value fixes that.
Tested-by: Anton Lundin <glance at acc.umu.se>
Signed-off-by: Lubomir I. Ivanov <neolit123 at gmail.com>
---
qt-ui/profile/diveprofileitem.cpp | 5 +++--
qt-ui/profile/ruleritem.cpp | 1 +
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/qt-ui/profile/diveprofileitem.cpp b/qt-ui/profile/diveprofileitem.cpp
index f42bbef..2ffc7ec 100644
--- a/qt-ui/profile/diveprofileitem.cpp
+++ b/qt-ui/profile/diveprofileitem.cpp
@@ -668,11 +668,12 @@ void PartialPressureGasItem::modelDataChanged(const QModelIndex &topLeft, const
void PartialPressureGasItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{
- painter->setPen(normalColor);
+ const qreal pWidth = 0.0;
+ painter->setPen(QPen(normalColor, pWidth));
painter->drawPolyline(polygon());
QPolygonF poly;
- painter->setPen(alertColor);
+ painter->setPen(QPen(alertColor, pWidth));
Q_FOREACH(const QPolygonF & poly, alertPolygons)
painter->drawPolyline(poly);
diff --git a/qt-ui/profile/ruleritem.cpp b/qt-ui/profile/ruleritem.cpp
index 627958e..071c74c 100644
--- a/qt-ui/profile/ruleritem.cpp
+++ b/qt-ui/profile/ruleritem.cpp
@@ -77,6 +77,7 @@ RulerItem2::RulerItem2() : source(new RulerNodeItem2()),
textItem->setFlag(QGraphicsItem::ItemIgnoresTransformations);
textItemBack->setBrush(QColor(0xff, 0xff, 0xff, 190));
textItemBack->setPen(QColor(Qt::white));
+ setPen(QPen(QColor(Qt::black), 0.0));
}
void RulerItem2::recalculate()
--
1.7.11.msysgit.0
More information about the subsurface
mailing list