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:
Vadim Zeitlin
2004-07-04 11:20:44 +00:00
parent 87b6002d7c
commit 92a4e4de68
2 changed files with 8 additions and 4 deletions

View File

@@ -1668,11 +1668,13 @@ wxListHeaderWindow::wxListHeaderWindow( wxWindow *win,
wxVisualAttributes attr = wxPanel::GetClassDefaultAttributes();
SetOwnForegroundColour( attr.colFg );
SetOwnBackgroundColour( attr.colBg );
SetOwnFont( attr.font );
if (!m_hasFont)
SetOwnFont( attr.font );
#else
SetOwnForegroundColour( wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT));
SetOwnBackgroundColour( wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE));
SetOwnFont( wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT ));
if (!m_hasFont)
SetOwnFont( wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT ));
#endif
}
@@ -2214,7 +2216,8 @@ wxListMainWindow::wxListMainWindow( wxWindow *parent,
wxVisualAttributes attr = wxGenericListCtrl::GetClassDefaultAttributes();
SetOwnForegroundColour( attr.colFg );
SetOwnBackgroundColour( attr.colBg );
SetOwnFont( attr.font );
if (!m_hasFont)
SetOwnFont( attr.font );
}
wxListMainWindow::~wxListMainWindow()