don't set font unless necessary (patch 984853)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28165 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1668,10 +1668,12 @@ wxListHeaderWindow::wxListHeaderWindow( wxWindow *win,
|
|||||||
wxVisualAttributes attr = wxPanel::GetClassDefaultAttributes();
|
wxVisualAttributes attr = wxPanel::GetClassDefaultAttributes();
|
||||||
SetOwnForegroundColour( attr.colFg );
|
SetOwnForegroundColour( attr.colFg );
|
||||||
SetOwnBackgroundColour( attr.colBg );
|
SetOwnBackgroundColour( attr.colBg );
|
||||||
|
if (!m_hasFont)
|
||||||
SetOwnFont( attr.font );
|
SetOwnFont( attr.font );
|
||||||
#else
|
#else
|
||||||
SetOwnForegroundColour( wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT));
|
SetOwnForegroundColour( wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT));
|
||||||
SetOwnBackgroundColour( wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE));
|
SetOwnBackgroundColour( wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE));
|
||||||
|
if (!m_hasFont)
|
||||||
SetOwnFont( wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT ));
|
SetOwnFont( wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT ));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -2214,6 +2216,7 @@ wxListMainWindow::wxListMainWindow( wxWindow *parent,
|
|||||||
wxVisualAttributes attr = wxGenericListCtrl::GetClassDefaultAttributes();
|
wxVisualAttributes attr = wxGenericListCtrl::GetClassDefaultAttributes();
|
||||||
SetOwnForegroundColour( attr.colFg );
|
SetOwnForegroundColour( attr.colFg );
|
||||||
SetOwnBackgroundColour( attr.colBg );
|
SetOwnBackgroundColour( attr.colBg );
|
||||||
|
if (!m_hasFont)
|
||||||
SetOwnFont( attr.font );
|
SetOwnFont( attr.font );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -793,6 +793,7 @@ bool wxGenericTreeCtrl::Create(wxWindow *parent,
|
|||||||
wxVisualAttributes attr = GetDefaultAttributes();
|
wxVisualAttributes attr = GetDefaultAttributes();
|
||||||
SetOwnForegroundColour( attr.colFg );
|
SetOwnForegroundColour( attr.colFg );
|
||||||
SetOwnBackgroundColour( attr.colBg );
|
SetOwnBackgroundColour( attr.colBg );
|
||||||
|
if (!m_hasFont)
|
||||||
SetOwnFont(attr.font);
|
SetOwnFont(attr.font);
|
||||||
|
|
||||||
// m_dottedPen = wxPen( "grey", 0, wxDOT ); too slow under XFree86
|
// m_dottedPen = wxPen( "grey", 0, wxDOT ); too slow under XFree86
|
||||||
|
Reference in New Issue
Block a user