From 328f4fee60529aa3d924415c2fe048a225b43122 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Sun, 31 Jul 2005 09:22:29 +0000 Subject: [PATCH] defaulting to small style (24x24), and correcting the cut-off decision to be at > 24 instead of >16 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35034 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/toolbar.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/mac/carbon/toolbar.cpp b/src/mac/carbon/toolbar.cpp index 20b595bfba..cbcd80f7b9 100644 --- a/src/mac/carbon/toolbar.cpp +++ b/src/mac/carbon/toolbar.cpp @@ -547,8 +547,6 @@ bool wxToolBar::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, cons else mode = kHIToolbarDisplayModeIconOnly ; - displaySize = kHIToolbarDisplaySizeDefault ; - HIToolbarSetDisplayMode( (HIToolbarRef) m_macHIToolbarRef , mode ) ; HIToolbarSetDisplaySize( (HIToolbarRef) m_macHIToolbarRef , displaySize ) ; } @@ -949,8 +947,14 @@ void wxToolBar::SetToolBitmapSize(const wxSize& size) if (m_macHIToolbarRef != NULL) { int maxs = wxMax( size.x, size.y ); - // TODO CHECK - HIToolbarDisplaySize sizeSpec = ((maxs > 16) ? kHIToolbarDisplaySizeNormal : kHIToolbarDisplaySizeSmall); + HIToolbarDisplaySize sizeSpec ; + if ( maxs > 32 ) + sizeSpec = kHIToolbarDisplaySizeLarge ; + else if ( maxs > 24 ) + sizeSpec = kHIToolbarDisplaySizeNormal ; + else + sizeSpec = kHIToolbarDisplaySizeSmall ; + HIToolbarSetDisplaySize( (HIToolbarRef) m_macHIToolbarRef, sizeSpec ); } #endif -- 2.45.2