- WindowRef rootwindow = GetMacRootWindow() ;
- wxWindow* wxrootwindow = wxFindWinFromMacWindow( rootwindow ) ;
- ::SetThemeWindowBackground( rootwindow , kThemeBrushDialogBackgroundActive , false ) ;
- wxMacDrawingHelper focus( wxrootwindow ) ;
- while (node)
- {
- wxToolBarTool *tool = (wxToolBarTool *)node->Data();
- wxBitmapRefData * bmap = (wxBitmapRefData*) ( tool->GetBitmap1().GetRefData()) ;
-
- if( !tool->IsSeparator() )
- {
- Rect toolrect = { toolbarrect.top + m_yMargin + kwxMacToolBarTopMargin, toolbarrect.left + x + m_xMargin + kwxMacToolBarLeftMargin , 0 , 0 } ;
- toolrect.right = toolrect.left + toolSize.x ;
- toolrect.bottom = toolrect.top + toolSize.y ;
-
- ControlHandle m_macToolHandle = (ControlHandle) m_macToolHandles[toolcount++] ;
-
- {
- Rect contrlRect ;
- GetControlBounds( m_macToolHandle , &contrlRect ) ;
- int former_mac_x = contrlRect.left ;
- int former_mac_y = contrlRect.top ;
- int mac_x = toolrect.left ;
- int mac_y = toolrect.top ;
-
- if ( mac_x != former_mac_x || mac_y != former_mac_y )
- {
- {
- Rect inval = { former_mac_y , former_mac_x , former_mac_y + toolSize.y , former_mac_x + toolSize.y } ;
- InvalWindowRect( rootwindow , &inval ) ;
- }
- UMAMoveControl( m_macToolHandle , mac_x , mac_y ) ;
- {
- Rect inval = { mac_y , mac_x , mac_y + toolSize.y , mac_x + toolSize.y } ;
- InvalWindowRect( rootwindow , &inval ) ;
- }
- }
- }
-
- x += (int)toolSize.x;
- noButtons ++;
- }
- else
- {
+ WindowRef rootwindow = (WindowRef) MacGetRootWindow() ;
+ while (node)
+ {
+ wxToolBarTool *tool = (wxToolBarTool *)node->Data();
+ wxBitmapRefData * bmap = (wxBitmapRefData*) ( tool->GetNormalBitmap().GetRefData()) ;
+
+ if( !tool->IsSeparator() )
+ {
+ Rect toolrect = { toolbarrect.top + m_yMargin + kwxMacToolBarTopMargin, toolbarrect.left + x + m_xMargin + kwxMacToolBarLeftMargin , 0 , 0 } ;
+ toolrect.right = toolrect.left + toolSize.x ;
+ toolrect.bottom = toolrect.top + toolSize.y ;
+
+ ControlHandle m_macToolHandle = (ControlHandle) m_macToolHandles[toolcount++] ;
+
+ {
+ Rect contrlRect ;
+ GetControlBounds( m_macToolHandle , &contrlRect ) ;
+ int former_mac_x = contrlRect.left ;
+ int former_mac_y = contrlRect.top ;
+ int mac_x = toolrect.left ;
+ int mac_y = toolrect.top ;
+
+ if ( mac_x != former_mac_x || mac_y != former_mac_y )
+ {
+ {
+ Rect inval = { former_mac_y , former_mac_x , former_mac_y + toolSize.y , former_mac_x + toolSize.y } ;
+ InvalWindowRect( rootwindow , &inval ) ;
+ }
+ UMAMoveControl( m_macToolHandle , mac_x , mac_y ) ;
+ {
+ Rect inval = { mac_y , mac_x , mac_y + toolSize.y , mac_x + toolSize.y } ;
+ InvalWindowRect( rootwindow , &inval ) ;
+ }
+ }
+ }
+
+ x += (int)toolSize.x;
+ noButtons ++;
+ }
+ else
+ {