From: vsr Date: Wed, 15 Oct 2014 07:24:37 +0000 (+0400) Subject: 0022773: [CEA 1314] Plot2d : The titles of the devices no visible after validating... X-Git-Tag: V7_5_0b1~22^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=48db22a23c542231dff4a26d8cfd0d04b7bd84ec;p=modules%2Fgui.git 0022773: [CEA 1314] Plot2d : The titles of the devices no visible after validating the settings window --- diff --git a/src/Plot2d/Plot2d_ViewFrame.cxx b/src/Plot2d/Plot2d_ViewFrame.cxx index 1fd36d09b..ee2f212cd 100755 --- a/src/Plot2d/Plot2d_ViewFrame.cxx +++ b/src/Plot2d/Plot2d_ViewFrame.cxx @@ -4292,6 +4292,12 @@ void Plot2d_AxisScaleDraw::draw( QPainter* painter, const QPalette & palette) co } +double Plot2d_AxisScaleDraw::extent( const QFont &font ) const +{ + QFontMetrics fm( font ); + return QwtScaleDraw::extent( font ) + fm.height() * 2; +} + QwtText Plot2d_AxisScaleDraw::label( double value) const { if (myLabelX.contains(value)) diff --git a/src/Plot2d/Plot2d_ViewFrame.h b/src/Plot2d/Plot2d_ViewFrame.h index 0a6f20214..d7318e24a 100755 --- a/src/Plot2d/Plot2d_ViewFrame.h +++ b/src/Plot2d/Plot2d_ViewFrame.h @@ -454,6 +454,8 @@ public: void applyTicks(); + double extent( const QFont &font ) const; + protected: void drawLabel( QPainter* painter, double value) const;