Example #1
0
void ControlToolBar::Repaint( wxDC *dc )
{
#ifndef USE_AQUA_THEME
   wxSize s = mSizer->GetSize();
   wxPoint p = mSizer->GetPosition();

   wxRect bevelRect( p.x, p.y, s.GetWidth() - 1, s.GetHeight() - 1 );
   AColor::Bevel( *dc, true, bevelRect );
#endif
}
Example #2
0
void ControlToolBar::OnPaint(wxPaintEvent & evt)
{
   wxPaintDC dc(this);

   int width, height;
   GetSize(&width, &height);


   #if defined __WXMAC__
      // Mac has an Aqua background...
      DrawBackground(dc, width, height); 
   #else
      if (mShowTools)
      {
         //TODO: Get rid of all the magic numbers used in sizing.
         // On other platforms put the big buttons on a beveled platform.
         DrawBackground(dc, 81, height);
         // Width is reduced by an extra two pixels to visually separate
         // the control toolbar from the next grab bar on the right.
         wxRect bevelRect( 81, 0, width-84, height-1 );
         AColor::Bevel( dc, true, bevelRect );
      }
      else
      {
         DrawBackground(dc, width, height); 
         wxRect bevelRect(0, 0, width - 1, height - 1);
         AColor::Bevel(dc, true, bevelRect);
      }
   #endif

   #ifndef __WXMAC__
      if (mShowTools)
      {
         // JKC: Grey horizontal spacer line between buttons.
         // Not quite ideal, but seems the best solution to 
         // make the tool button heights add up to the 
         // main control button height.
         AColor::Dark( &dc, false);
         dc.DrawLine(0, 27, 81, 27);
      }
   #endif
}