X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/abdeb9e7006488bf917d90048fcd0cbe22f44a71..c156411a0886a4b49a0c30c36153fb3c1edd4b51:/src/gtk/choice.cpp diff --git a/src/gtk/choice.cpp b/src/gtk/choice.cpp index 9c63f8502f..54f9b1de42 100644 --- a/src/gtk/choice.cpp +++ b/src/gtk/choice.cpp @@ -560,7 +560,11 @@ wxSize wxChoice::DoGetBestSize() const if ( ret.x < 80 ) ret.x = 80; - ret.y = 16 + GetCharHeight(); + // If this request_size is called with no entries then + // the returned height is wrong. Give it a reasonable + // default value. + if (ret.y <= 18) + ret.y = 8 + GetCharHeight(); return ret; } @@ -574,6 +578,13 @@ bool wxChoice::IsOwnGtkWindow( GdkWindow *window ) #endif } +// static +wxVisualAttributes +wxChoice::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant)) +{ + return GetDefaultAttributesFromGTKWidget(gtk_option_menu_new); +} + #endif // wxUSE_CHOICE