Changed ComboDropDown button under GTK+ so that it
will create a transparent button. This works for the date control, but should be generalized somehow. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32462 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
7ab378223c
commit
83dc6964f0
@ -194,12 +194,33 @@ void wxDropdownButton::DoMoveWindow(int x, int y, int w, int h)
|
||||
|
||||
wxRect r(0,0,bw, bh);
|
||||
wxRendererNative& renderer = wxRendererNative::Get();
|
||||
|
||||
#ifdef __WXGTK__
|
||||
wxColour magic(255,0,255);
|
||||
dc.SetBrush( wxBrush( magic ) );
|
||||
dc.SetPen( *wxTRANSPARENT_PEN );
|
||||
dc.DrawRectangle(0,0,bw,bh);
|
||||
renderer.DrawComboBoxDropButton(this, dc, r);
|
||||
wxMask *mask = new wxMask( bmp, magic );
|
||||
bmp.SetMask( mask );
|
||||
#else
|
||||
renderer.DrawComboBoxDropButton(this, dc, r);
|
||||
#endif
|
||||
SetBitmapLabel(bmp);
|
||||
|
||||
wxBitmap bmpSel(bw, bh);
|
||||
dc.SelectObject(bmpSel);
|
||||
|
||||
#ifdef __WXGTK__
|
||||
dc.SetBrush( wxBrush( magic ) );
|
||||
dc.SetPen( *wxTRANSPARENT_PEN );
|
||||
dc.DrawRectangle(0,0,bw,bh);
|
||||
renderer.DrawComboBoxDropButton(this, dc, r, wxCONTROL_PRESSED);
|
||||
mask = new wxMask( bmpSel, magic );
|
||||
bmpSel.SetMask( mask );
|
||||
#else
|
||||
renderer.DrawComboBoxDropButton(this, dc, r, wxCONTROL_PRESSED);
|
||||
#endif
|
||||
SetBitmapSelected(bmpSel);
|
||||
}
|
||||
|
||||
|
@ -396,19 +396,6 @@ void wxRendererGTK::DrawComboBoxDropButton(wxWindow *win,
|
||||
else
|
||||
state = GTK_STATE_NORMAL;
|
||||
|
||||
// erase background first
|
||||
gtk_paint_box
|
||||
(
|
||||
button->style,
|
||||
wdc.m_window,
|
||||
state,
|
||||
GTK_SHADOW_NONE,
|
||||
NULL,
|
||||
button,
|
||||
"button",
|
||||
rect.x, rect.y, rect.width, rect.height
|
||||
);
|
||||
|
||||
// draw arrow on button
|
||||
gtk_paint_arrow
|
||||
(
|
||||
|
@ -396,19 +396,6 @@ void wxRendererGTK::DrawComboBoxDropButton(wxWindow *win,
|
||||
else
|
||||
state = GTK_STATE_NORMAL;
|
||||
|
||||
// erase background first
|
||||
gtk_paint_box
|
||||
(
|
||||
button->style,
|
||||
wdc.m_window,
|
||||
state,
|
||||
GTK_SHADOW_NONE,
|
||||
NULL,
|
||||
button,
|
||||
"button",
|
||||
rect.x, rect.y, rect.width, rect.height
|
||||
);
|
||||
|
||||
// draw arrow on button
|
||||
gtk_paint_arrow
|
||||
(
|
||||
|
Loading…
Reference in New Issue
Block a user