Hi,
I noticed the Qt widget adds gray margins when the plot aspect ratio is
different
from the window ratio. There is nothing wrong with that, but the hardcoded color
choice makes my application look odd. Maybe it would be better to use the
current
plplot background color instead of this Qt::gray/Qt::Dense4Pattern brush for the
margins.
Here are some screenshots of the plplot example application with and without
the proposed change:
http://diaxen.ssji.net/pl/
BR,
Index: bindings/qt_gui/plqt.cpp
===================================================================
--- bindings/qt_gui/plqt.cpp (revision 12109)
+++ bindings/qt_gui/plqt.cpp (working copy)
@@ -1267,8 +1267,7 @@
painter->begin( m_pixPixmap );
// Draw the margins and the background
- painter->fillRect( 0, 0, width(), height(), QBrush( Qt::white ) );
- painter->fillRect( 0, 0, width(), height(), QBrush( Qt::gray,
Qt::Dense4Pattern ) );
+ painter->fillRect( 0, 0, width(), height(), QColor( bgColour.r,
bgColour.g, bgColour.b ) );
// Re-initialise pens etc.
resetPensAndBrushes( painter );
--
Alexandre
Index: bindings/qt_gui/plqt.cpp
===================================================================
--- bindings/qt_gui/plqt.cpp (revision 12109)
+++ bindings/qt_gui/plqt.cpp (working copy)
@@ -1267,8 +1267,7 @@
painter->begin( m_pixPixmap );
// Draw the margins and the background
- painter->fillRect( 0, 0, width(), height(), QBrush( Qt::white ) );
- painter->fillRect( 0, 0, width(), height(), QBrush( Qt::gray, Qt::Dense4Pattern ) );
+ painter->fillRect( 0, 0, width(), height(), QColor( bgColour.r, bgColour.g, bgColour.b ) );
// Re-initialise pens etc.
resetPensAndBrushes( painter );
------------------------------------------------------------------------------
Cloud Computing - Latest Buzzword or a Glimpse of the Future?
This paper surveys cloud computing today: What are the benefits?
Why are businesses embracing it? What are its payoffs and pitfalls?
http://www.accelacomm.com/jaw/sdnl/114/51425149/
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel