Opened 9 years ago

Last modified 4 years ago

#10916 accepted defect

wxOSX_cocoa, 2.9-branch, toolbars sizing broken

Reported by: jensverwiebe Owned by: csomor
Priority: normal Milestone: 2.9.1
Component: wxOSX Version: 3.0.0
Keywords: Cc:
Blocked By: Blocking:
Patch: no


With rev 61115 i encounterd that wxToolbars not longer respect the size ( neiter minsize...).

That worked well before. Important for the upcoming release.

BTW: to keep ways short, you can mail me directly if you want.

The app i use wx for is still luxrender ( )


Attachments (1)

toolbar.png download (38.9 KB) - added by jensverwiebe 9 years ago.
before and after, TB should be 450px wide

Download all attachments as: .zip

Change History (7)

Changed 9 years ago by jensverwiebe

before and after, TB should be 450px wide

comment:1 Changed 9 years ago by csomor

  • Owner set to csomor
  • Status changed from new to accepted

ok, I see, but before it didn't work unless you set the min size explicitly so that was worse for the normal case, could you post the snippet of your tb creation and size setting sequence ?

comment:2 Changed 9 years ago by jensverwiebe

Hi Stefan

Here is the code that worked fine before ( see also screenshot in former attachement ):

m_renderToolBar = new wxToolBar( m_renderPage, wxID_ANY, wxDefaultPosition, wxSize( 447,-1 ), wxTB_HORIZONTAL );
	m_renderToolBar->SetToolBitmapSize( wxSize( 16,16 ) );


comment:3 Changed 8 years ago by vadz

  • Milestone changed from 2.9.0 to 2.9.1
  • Status changed from accepted to infoneeded

Is this still relevant? If yes, could you please submit a small patch to the toolbar sample showing the problem?


comment:4 Changed 4 years ago by andreas.pflug

  • Status changed from infoneeded to accepted
  • Version changed from stable-latest to 3.0.0

This bug is still present in 3.0. With SetToolBitmapSize(wxSize(16,16), the tool bitmaps are scaled to 32x32.

comment:5 Changed 4 years ago by csomor

Hi Andreas

Note that this bug report is not about bitmap sizes, but about the sizing of empty space in the toolbar.

But to comment on your issue

There are 2 different sizes for the native toolbar and it scales all its images to this size, either 24x24 or 32x32
but if you set it to 16,16 then the native one should only scale to 24x24, so there still must be a reason for the 32x32 in your case.

Are you sure that none of your bitmaps are larger ? this could be an explanation because Realize calls the base-class Realize method, which calls AdjustBitmapSize which calls SetToolBitmapSize with the largest bitmap size ..

comment:6 Changed 4 years ago by andreas.pflug

I've been using 16x16 bitmaps only, which show ok on msw and gtk, but not osx.

I can see the toolbar resizing to the max bitmap height on msw and gtk, and would consider this unexpected; I'd rather like to have all bitmaps resized to the toolbitmap size I specified, and not see my specification ignored...

Note: See TracTickets for help on using tickets.