- Fix bug in generic wxDataViewCtrl column dragging (jobuz).
- Add wxMask::GetBitmap() for wxMSW, wxGTK and wxOSX
- Add wxCheckListBox::GetCheckedItems() (hartwigw).
+- Add wxAUI_TB_PLAIN_BACKGROUND wxAuiToolBar style (Allann Jones).
wxGTK:
// analogous to wxAUI_TB_VERTICAL, but forces the toolbar
// to be horizontal
wxAUI_TB_HORIZONTAL = 1 << 7,
+ wxAUI_TB_PLAIN_BACKGROUND = 1 << 8,
wxAUI_TB_HORZ_TEXT = (wxAUI_TB_HORZ_LAYOUT | wxAUI_TB_TEXT),
wxAUI_ORIENTATION_MASK = (wxAUI_TB_VERTICAL | wxAUI_TB_HORIZONTAL),
wxAUI_TB_DEFAULT_STYLE = 0
wxWindow* wnd,
const wxRect& rect) = 0;
+ virtual void DrawPlainBackground(
+ wxDC& dc,
+ wxWindow* wnd,
+ const wxRect& rect) = 0;
+
virtual void DrawLabel(
wxDC& dc,
wxWindow* wnd,
wxWindow* wnd,
const wxRect& rect);
+ virtual void DrawPlainBackground(wxDC& dc,
+ wxWindow* wnd,
+ const wxRect& rect);
+
virtual void DrawLabel(
wxDC& dc,
wxWindow* wnd,
*/
wxAUI_TB_HORIZONTAL = 1 << 7,
+
+ /**
+ Draw a plain background (based on parent) instead of the default gradient background.
+
+ @since 2.9.5
+ */
+ wxAUI_TB_PLAIN_BACKGROUND = 1 << 8,
+
/**
Shows the text alongside the icons, not vertically stacked.
*/
wxWindow* wnd,
const wxRect& rect) = 0;
+ virtual void DrawPlainBackground(
+ wxDC& dc,
+ wxWindow* wnd,
+ const wxRect& rect) = 0;
+
virtual void DrawLabel(
wxDC& dc,
wxWindow* wnd,
wxWindow* wnd,
const wxRect& rect);
+ virtual void DrawPlainBackground(wxDC& dc,
+ wxWindow* wnd,
+ const wxRect& rect);
+
virtual void DrawLabel(
wxDC& dc,
wxWindow* wnd,
@style{wxAUI_TB_HORIZONTAL}
analogous to wxAUI_TB_VERTICAL, but forces the toolbar
to be horizontal
+ @style{wxAUI_TB_PLAIN_BACKGROUND}
+ Draw a plain background (based on parent) instead of the
+ default gradient background.
@style{wxAUI_TB_HORZ_TEXT}
Equivalent to wxAUI_TB_HORZ_LAYOUT | wxAUI_TB_TEXT
@style{wxAUI_TB_DEFAULT_STYLE}
dc.GradientFillLinear(rect, startColour, endColour, wxSOUTH);
}
+void wxAuiDefaultToolBarArt::DrawPlainBackground(wxDC& dc,
+ wxWindow* WXUNUSED(wnd),
+ const wxRect& _rect)
+{
+ wxRect rect = _rect;
+ rect.height++;
+
+ dc.SetBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE));
+
+ dc.DrawRectangle(rect.GetX() - 1, rect.GetY() - 1,
+ rect.GetWidth() + 2, rect.GetHeight() + 1);
+}
+
void wxAuiDefaultToolBarArt::DrawLabel(
wxDC& dc,
wxWindow* WXUNUSED(wnd),
bool horizontal = m_orientation == wxHORIZONTAL;
-
- m_art->DrawBackground(dc, this, cli_rect);
+ if (m_windowStyle & wxAUI_TB_PLAIN_BACKGROUND)
+ m_art->DrawPlainBackground(dc, this, cli_rect);
+ else
+ m_art->DrawBackground(dc, this, cli_rect);
int gripperSize = m_art->GetElementSize(wxAUI_TBART_GRIPPER_SIZE);
int dropdown_size = m_art->GetElementSize(wxAUI_TBART_OVERFLOW_SIZE);