X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/debe6624c1e9d4bf3243381153d1e173c849bcd8..a367b9b3f8a722d6029e209070be11d120be0180:/src/msw/gauge95.cpp diff --git a/src/msw/gauge95.cpp b/src/msw/gauge95.cpp index 7fbe861c1d..e48513d680 100644 --- a/src/msw/gauge95.cpp +++ b/src/msw/gauge95.cpp @@ -24,7 +24,7 @@ #include "wx/defs.h" #endif -#if USE_GAUGE && defined(__WIN95__) +#if wxUSE_GAUGE && defined(__WIN95__) #include "wx/msw/gauge95.h" #include "wx/msw/private.h" @@ -50,9 +50,10 @@ bool wxGauge95::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; @@ -107,6 +108,8 @@ void wxGauge95::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)) { @@ -175,4 +178,4 @@ void wxGauge95::SetBackgroundColour(const wxColour& col) m_backgroundColour = col ; } -#endif // USE_GAUGE +#endif // wxUSE_GAUGE