Ticket #10585 (closed enhancement: fixed)
Allow to easily use plain background for wxAuiToolbar
| Reported by: | allanjos | Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | |
| Component: | wxAui | Version: | 2.9-svn |
| Keywords: | Cc: | ||
| Blocked By: | Patch: | yes | |
| Blocking: |
Description
Follows a proposed modification to the wxAuiToolBar,
adding a item to wxAuiToolBarStyle. The item is
wxAUI_TB_PLAIN_BACKGROUND that allows to easy setup a plain background
to the AUI toolbar, without the need to override drawing methods. This
style contrasts with the default behaviour of the wxAuiToolBar that
draws a background gradient and this break the window design when
putting it within a control that has margin between the borders and
the toolbar (example: put wxAuiToolBar within a wxStaticBoxSizer that
has a plain background). This was the old behaviour of wxToolBar on
MSW, but Windows Vista changes this behaviour drawing a gradient
background on the toolbar control.
Modifications to the wxAuiToolBar::OnPaint:
if (m_style & wxAUI_TB_PLAIN_BACKGROUND)
m_art->DrawPlainBackground(dc, this, cli_rect);
else
m_art->DrawBackground(dc, this, cli_rect);
Thank you.

