Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

wxMac 2.8.7 toolbar bug

6 views
Skip to first unread message

Joost

unread,
Dec 13, 2007, 11:10:31 PM12/13/07
to
Hi,

A window in my application contains a secondary toolbar (i.e. not the
windows' main toolbar, but a toolbar inside a wxNoteBook).

There's a bug in wxMac 2.8.7: if a button in such a secondary toolbar is
toggleable, the bitmap is not displayed (there's just an empty square).
It worked fine in 2.8.4.

In wxToolBarTool::UpdateToggleImage(), wxMacCreateBitmapButton is
called. In 2.8.4 a third parameter kControlContentIconRef was passed,
but this was apparently removed in 2.8.7. I have no idea how this works,
but the following patch fixes it for me:


src/mac/carbon/toolbar.cpp:
void wxToolBarTool::UpdateToggleImage( bool toggle )
{
// Added:
int forcetype=0;
if (m_toolbarItemRef == NULL)
{
forcetype=kControlContentIconRef;
}
// /Added

(...)

// Replace:
// wxMacCreateBitmapButton( &info, bmp );
wxMacCreateBitmapButton( &info, bmp, forcetype );

(...)

// Replace:
// wxMacCreateBitmapButton( &info, m_bmpNormal );
wxMacCreateBitmapButton( &info, m_bmpNormal, forcetype );
(...)
}


I'm not sure if this is the right way to fix it; perhaps someone more
familiar with the source code check this and do a proper patch?

Thanks as always
Joost

---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-u...@lists.wxwidgets.org
For additional commands, e-mail: wx-use...@lists.wxwidgets.org

Stefan Csomor

unread,
Dec 14, 2007, 5:48:27 AM12/14/07
to
Hi

update with WX_2_8_BRANCH, should be fixed there

Best,

Stefan

--

Advanced Concepts AG
Software-Engineering
Heldweg 10
CH-8475 Ossingen
Switzerland

phone:+41 52 245 0 245
fax:+41 52 245 0 246
http://www.advanced.ch
mailto:cso...@advanced.ch

0 new messages