From bccb042c2a810144de90ffee88380ddd67edb762 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 5 Oct 2009 22:57:15 +0000 Subject: [PATCH] Make info bar buttons smaller. This looks better under Mac OS X (and currently has no effect under the other platforms). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62297 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/infobar.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/generic/infobar.cpp b/src/generic/infobar.cpp index 5da86013d5..dcaac0c878 100644 --- a/src/generic/infobar.cpp +++ b/src/generic/infobar.cpp @@ -302,8 +302,14 @@ void wxInfoBarGeneric::AddButton(wxWindowID btnid, const wxString& label) m_button->Hide(); } - sizer->Add(new wxButton(this, btnid, label), - wxSizerFlags().Centre().DoubleBorder()); + wxButton * const button = new wxButton(this, btnid, label); + +#ifdef __WXMAC__ + // smaller buttons look better in the (narrow) info bar under OS X + button->SetWindowVariant(wxWINDOW_VARIANT_SMALL); +#endif // __WXMAC__ + + sizer->Add(button, wxSizerFlags().Centre().DoubleBorder()); } void wxInfoBarGeneric::RemoveButton(wxWindowID btnid) -- 2.45.2