X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c4e7c2aa5822f9a6e97d8d7848b95ea2eadcd98b..520e470fdd0daef09c77938db642e4583933c90d:/src/msw/gaugemsw.cpp diff --git a/src/msw/gaugemsw.cpp b/src/msw/gaugemsw.cpp index 65a4018239..0c33ec4dda 100644 --- a/src/msw/gaugemsw.cpp +++ b/src/msw/gaugemsw.cpp @@ -24,7 +24,7 @@ #include "wx/defs.h" #endif -#if USE_GAUGE +#if wxUSE_GAUGE #include "wx/msw/gaugemsw.h" #include "wx/msw/private.h" @@ -85,9 +85,10 @@ bool wxGaugeMSW::Create(wxWindow *parent, wxWindowID id, if (parent) parent->AddChild(this); m_rangeMax = range; + m_gaugePos = 0; - SetBackgroundColour(parent->GetDefaultBackgroundColour()) ; - SetForegroundColour(parent->GetDefaultForegroundColour()) ; + SetBackgroundColour(parent->GetBackgroundColour()) ; + SetForegroundColour(parent->GetForegroundColour()) ; m_windowStyle = style; @@ -154,6 +155,8 @@ void wxGaugeMSW::SetSize(int x, int y, int width, int height, int sizeFlags) if (y == -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE)) y1 = currentY; + AdjustForParentClientOrigin(x1, y1, sizeFlags); + // If we're prepared to use the existing size, then... if (width == -1 && height == -1 && ((sizeFlags & wxSIZE_AUTO) != wxSIZE_AUTO)) { @@ -1168,4 +1171,4 @@ zyzgForceRepaint3D: /** EOF: zyzgauge.c **/ -#endif // USE_GAUGE +#endif // wxUSE_GAUGE