Add wxSystemThemedControl and use it in wxMSW

wxSystemThemedControl allows to use the "system theme" (i.e. the theme used by
the system applications such as file manager and which can, surprisingly, be
different from the default one). Currently it is only implemented for wxMSW
and does nothing under the other platforms.

Use wxSystemThemedControl for wxDataViewCtrl, wxListCtrl and, optionally, if
wxTR_TWIST_BUTTONS style is specified, wxTreeCtrl to give them more native
appearance under MSW.

Closes #16414.
This commit is contained in:
Tobias Taschner
2015-09-17 14:46:27 +02:00
committed by Vadim Zeitlin
parent b7a89f8746
commit 2fff3cd29f
26 changed files with 337 additions and 20 deletions

View File

@@ -4659,6 +4659,8 @@ bool wxDataViewCtrl::Create(wxWindow *parent,
sizer->Add( m_clientArea, 1, wxGROW );
SetSizer( sizer );
EnableSystemTheme();
return true;
}
@@ -5419,6 +5421,14 @@ void wxDataViewCtrl::ToggleSortByColumn(int column)
m_headerArea->ToggleSortByColumn(column);
}
void wxDataViewCtrl::DoEnableSystemTheme(bool enable, wxWindow* window)
{
wxSystemThemedControl::DoEnableSystemTheme(enable, window);
wxSystemThemedControl::DoEnableSystemTheme(enable, m_clientArea);
if ( m_headerArea )
wxSystemThemedControl::DoEnableSystemTheme(enable, m_headerArea);
}
#endif // !wxUSE_GENERICDATAVIEWCTRL
#endif // wxUSE_DATAVIEWCTRL