[ 1492391 ] Fix wxComboCtrl button rendering problem.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39260 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
f385b493df
commit
b61f4f77bc
@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: combocmn.cpp
|
// Name: src/common/combocmn.cpp
|
||||||
// Purpose: wxComboCtrlBase
|
// Purpose: wxComboCtrlBase
|
||||||
// Author: Jaakko Salli
|
// Author: Jaakko Salli
|
||||||
// Modified by:
|
// Modified by:
|
||||||
@ -26,7 +26,6 @@
|
|||||||
#if wxUSE_COMBOCTRL
|
#if wxUSE_COMBOCTRL
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include "wx/defs.h"
|
|
||||||
#include "wx/log.h"
|
#include "wx/log.h"
|
||||||
#include "wx/combobox.h"
|
#include "wx/combobox.h"
|
||||||
#include "wx/dcclient.h"
|
#include "wx/dcclient.h"
|
||||||
@ -694,13 +693,13 @@ void wxComboCtrlBase::Init()
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool wxComboCtrlBase::Create(wxWindow *parent,
|
bool wxComboCtrlBase::Create(wxWindow *parent,
|
||||||
wxWindowID id,
|
wxWindowID id,
|
||||||
const wxString& value,
|
const wxString& value,
|
||||||
const wxPoint& pos,
|
const wxPoint& pos,
|
||||||
const wxSize& size,
|
const wxSize& size,
|
||||||
long style,
|
long style,
|
||||||
const wxValidator& validator,
|
const wxValidator& validator,
|
||||||
const wxString& name)
|
const wxString& name)
|
||||||
{
|
{
|
||||||
if ( !wxControl::Create(parent,
|
if ( !wxControl::Create(parent,
|
||||||
id,
|
id,
|
||||||
@ -1178,9 +1177,19 @@ void wxComboCtrlBase::DrawButton( wxDC& dc, const wxRect& rect, bool paintBg )
|
|||||||
if ( !m_bmpNormal.Ok() )
|
if ( !m_bmpNormal.Ok() )
|
||||||
{
|
{
|
||||||
// Need to clear button background even if m_btn is present
|
// Need to clear button background even if m_btn is present
|
||||||
// (assume non-button background was cleared just before this call so brushes are good)
|
|
||||||
if ( paintBg )
|
if ( paintBg )
|
||||||
|
{
|
||||||
|
wxColour bgCol;
|
||||||
|
|
||||||
|
if ( m_iFlags & wxCC_IFLAG_BUTTON_OUTSIDE )
|
||||||
|
bgCol = GetParent()->GetBackgroundColour();
|
||||||
|
else
|
||||||
|
bgCol = GetBackgroundColour();
|
||||||
|
|
||||||
|
dc.SetBrush(bgCol);
|
||||||
|
dc.SetPen(bgCol);
|
||||||
dc.DrawRectangle(rect);
|
dc.DrawRectangle(rect);
|
||||||
|
}
|
||||||
|
|
||||||
// Draw standard button
|
// Draw standard button
|
||||||
wxRendererNative::Get().DrawComboBoxDropButton(this,
|
wxRendererNative::Get().DrawComboBoxDropButton(this,
|
||||||
|
Loading…
Reference in New Issue
Block a user