X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/81d66cf39f810503baed79213bc3122fda0ccc7b..520e470fdd0daef09c77938db642e4583933c90d:/src/msw/slider95.cpp diff --git a/src/msw/slider95.cpp b/src/msw/slider95.cpp index 883951314d..5347975b71 100644 --- a/src/msw/slider95.cpp +++ b/src/msw/slider95.cpp @@ -68,8 +68,8 @@ bool wxSlider95::Create(wxWindow *parent, wxWindowID id, SetValidator(validator); if (parent) parent->AddChild(this); - SetBackgroundColour(parent->GetDefaultBackgroundColour()) ; - SetForegroundColour(parent->GetDefaultForegroundColour()) ; + SetBackgroundColour(parent->GetBackgroundColour()) ; + SetForegroundColour(parent->GetForegroundColour()) ; m_staticValue = 0; m_staticMin = 0; @@ -154,6 +154,10 @@ bool wxSlider95::Create(wxWindow *parent, wxWindowID id, SubclassWin(GetHWND()); + SetWindowText((HWND) m_hWnd, ""); + + SetFont(* parent->GetFont()); + if ( m_windowStyle & wxSL_LABELS ) { // Finally, create max value static item @@ -163,7 +167,6 @@ bool wxSlider95::Create(wxWindow *parent, wxWindowID id, 0, 0, 0, 0, (HWND) parent->GetHWND(), (HMENU)NewControlId(), wxGetInstance(), NULL); - SetFont(parent->GetFont()); if (GetFont()) { @@ -418,6 +421,11 @@ void wxSlider95::SetSize(int x, int y, int width, int height, int sizeFlags) else { // No labels + // If we're prepared to use the existing size, then... + if (width == -1 && height == -1 && ((sizeFlags & wxSIZE_AUTO) != wxSIZE_AUTO)) + { + GetSize(&w1, &h1); + } if ( w1 < 0 ) w1 = 200; if ( h1 < 0 ) @@ -479,6 +487,11 @@ void wxSlider95::SetSize(int x, int y, int width, int height, int sizeFlags) else { // No labels + // If we're prepared to use the existing size, then... + if (width == -1 && height == -1 && ((sizeFlags & wxSIZE_AUTO) != wxSIZE_AUTO)) + { + GetSize(&w1, &h1); + } if ( w1 < 0 ) w1 = 20; if ( h1 < 0 )