From d0d83d5d7d2d148dfd572c4e5b325f04d93c6b69 Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Sun, 11 Oct 2015 14:21:14 +0300 Subject: profilewidget2: fix line width when printing on OSX and Linux On OSX and Linux only, the cosmetic width of the QPen on profile axes does not work and is weirdly dependent on the fact if a printer is installed or not. Possible Qt bugs at hand. The same is not present on Win32. To solve the issues we add setPrintMode() in DiveCartesianAxis and call it for all instances of the class in ProfileWidget2. This patch also moves gridPen() as a private member function of PartialGasPressureAxis as it now needs to access member variables. Fixes #943 Reported-by: Willem Ferguson Signed-off-by: Lubomir I. Ivanov Signed-off-by: Dirk Hohndel --- qt-ui/profile/divecartesianaxis.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'qt-ui/profile/divecartesianaxis.h') diff --git a/qt-ui/profile/divecartesianaxis.h b/qt-ui/profile/divecartesianaxis.h index 15155692e..27cfa62d8 100644 --- a/qt-ui/profile/divecartesianaxis.h +++ b/qt-ui/profile/divecartesianaxis.h @@ -16,6 +16,9 @@ class DiveCartesianAxis : public QObject, public QGraphicsLineItem { Q_PROPERTY(QPointF pos WRITE setPos READ pos) Q_PROPERTY(qreal x WRITE setX READ x) Q_PROPERTY(qreal y WRITE setY READ y) +private: + bool printMode; + QPen gridPen(); public: enum Orientation { TopToBottom, @@ -25,6 +28,7 @@ public: }; DiveCartesianAxis(); virtual ~DiveCartesianAxis(); + void setPrintMode(bool mode); void setMinimum(double minimum); void setMaximum(double maximum); void setTickInterval(double interval); -- cgit v1.2.3-70-g09d2