Allow using wxRendererNative::DrawGauge() for vertical gauges too
It was unexpected that this method could only be used for horizontal gauges, so make it work for the vertical ones if wxCONTROL_SPECIAL flag is specified. Update MSW and generic implementations and the render sample to show a vertical gauge as well.
This commit is contained in:
@@ -284,12 +284,17 @@ private:
|
||||
y += lineHeight + rBtn.height;
|
||||
#endif // wxHAS_DRAW_TITLE_BAR_BITMAP
|
||||
|
||||
// The meanings of those are reversed for the vertical gauge below.
|
||||
const wxCoord heightGauge = 24;
|
||||
const wxCoord widthGauge = 180;
|
||||
|
||||
dc.DrawText("DrawGauge()", x1, y);
|
||||
renderer.DrawGauge(this, dc,
|
||||
wxRect(x2, y, widthGauge, heightGauge), 25, 100, m_flags);
|
||||
renderer.DrawGauge(this, dc,
|
||||
wxRect(x2 + widthGauge + 30, y + heightGauge - widthGauge,
|
||||
heightGauge, widthGauge),
|
||||
25, 100, m_flags | wxCONTROL_SPECIAL);
|
||||
|
||||
y += lineHeight + heightGauge;
|
||||
|
||||
|
Reference in New Issue
Block a user