X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/db434467a143a2c847c4bcfe987f0202c2d02bf2..10992a81d39da31b79063387b7b71c0ff68737ce:/src/gtk1/spinctrl.cpp diff --git a/src/gtk1/spinctrl.cpp b/src/gtk1/spinctrl.cpp index 9e51422831..db68c07d70 100644 --- a/src/gtk1/spinctrl.cpp +++ b/src/gtk1/spinctrl.cpp @@ -97,8 +97,6 @@ bool wxSpinCtrl::Create(wxWindow *parent, wxWindowID id, PostCreation(); - ApplyWidgetStyle(); - SetFont( parent->GetFont() ); wxSize size_best( DoGetBestSize() ); @@ -107,6 +105,8 @@ bool wxSpinCtrl::Create(wxWindow *parent, wxWindowID id, new_size.x = size_best.x; if (new_size.y == -1) new_size.y = size_best.y; + if (new_size.y > size_best.y) + new_size.y = size_best.y; if ((new_size.x != size.x) || (new_size.y != size.y)) SetSize( new_size.x, new_size.y ); @@ -222,7 +222,7 @@ void wxSpinCtrl::OnChar( wxKeyEvent &event ) if (event.KeyCode() == WXK_RETURN) { wxWindow *top_frame = m_parent; - while (top_frame->GetParent() && !(top_frame->GetParent()->m_isFrame)) + while (top_frame->GetParent() && !(top_frame->GetParent()->IsTopLevel())) top_frame = top_frame->GetParent(); GtkWindow *window = GTK_WINDOW(top_frame->m_widget);