X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/226441f05f9f956c89147429e6e87ea2a860478a..713c7336f2c96b1deddd24ec38b2a094705635b9:/src/propgrid/editors.cpp diff --git a/src/propgrid/editors.cpp b/src/propgrid/editors.cpp index 950539a507..e22b376018 100644 --- a/src/propgrid/editors.cpp +++ b/src/propgrid/editors.cpp @@ -6,7 +6,7 @@ // Created: 2007-04-14 // RCS-ID: $Id$ // Copyright: (c) Jaakko Salli -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// // For compilers that support precompilation, includes "wx/wx.h". @@ -848,6 +848,10 @@ void wxPropertyGrid::OnComboItemPaint( const wxPGComboBox* pCb, else { renderFlags |= wxPGCellRenderer::ChoicePopup; + + // For consistency, always use normal font when drawing drop down + // items + dc.SetFont(GetFont()); } // If not drawing a selected popup item, then give property's @@ -1508,8 +1512,7 @@ END_EVENT_TABLE() wxSimpleCheckBox::~wxSimpleCheckBox() { - delete ms_doubleBuffer; - ms_doubleBuffer = NULL; + wxDELETE(ms_doubleBuffer); } wxBitmap* wxSimpleCheckBox::ms_doubleBuffer = NULL; @@ -1915,6 +1918,13 @@ wxWindow* wxPropertyGrid::GenerateEditorTextCtrl( const wxPoint& pos, } #endif + // This code is repeated from DoSelectProperty(). However, font boldness + // must be set before margin is set up below in FixPosForTextCtrl(). + if ( forColumn == 1 && + prop->HasFlag(wxPG_PROP_MODIFIED) && + HasFlag(wxPG_BOLD_MODIFIED) ) + tc->SetFont( m_captionFont ); + // Center the control vertically if ( !hasSpecialSize ) FixPosForTextCtrl(tc, forColumn);