fix wxComboCtrl colours under Windows Vista (patch 1710006) [backport from HEAD]
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@45984 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -121,6 +121,7 @@ wxMSW:
|
|||||||
- Fixed bug in wxThread::Wait() in console applications introduced in 2.8.3
|
- Fixed bug in wxThread::Wait() in console applications introduced in 2.8.3
|
||||||
- Support right-aligned/centered owner drawn items in wxListCtrl (troelsk)
|
- Support right-aligned/centered owner drawn items in wxListCtrl (troelsk)
|
||||||
- Compilation fixed with WXWIN_COMPATIBILITY_2_6==0
|
- Compilation fixed with WXWIN_COMPATIBILITY_2_6==0
|
||||||
|
- Fix wxComboCtrl colours under Windows Vista (Kolya Kosenko)
|
||||||
|
|
||||||
wxGTK:
|
wxGTK:
|
||||||
|
|
||||||
|
@@ -164,13 +164,20 @@ void wxComboCtrl::OnThemeChange()
|
|||||||
wxUxThemeEngine* theme = wxUxThemeEngine::GetIfActive();
|
wxUxThemeEngine* theme = wxUxThemeEngine::GetIfActive();
|
||||||
if ( theme )
|
if ( theme )
|
||||||
{
|
{
|
||||||
wxUxThemeHandle hTheme(this, L"COMBOBOX");
|
wxUxThemeHandle hTheme(this, L"EDIT");
|
||||||
|
|
||||||
COLORREF col;
|
COLORREF col;
|
||||||
theme->GetThemeColor(hTheme,EP_EDITTEXT,ETS_NORMAL,TMT_FILLCOLOR,&col);
|
HRESULT hr = theme->GetThemeColor(hTheme,EP_EDITTEXT,ETS_NORMAL,TMT_FILLCOLOR,&col);
|
||||||
SetBackgroundColour(wxRGBToColour(col));
|
if ( FAILED(hr) )
|
||||||
theme->GetThemeColor(hTheme,EP_EDITTEXT,ETS_NORMAL,TMT_TEXTCOLOR,&col);
|
wxLogApiError(_T("GetThemeColor(EDIT, EP_EDITTEXT, ETS_NORMAL, TMT_FILLCOLOR)"), hr);
|
||||||
SetForegroundColour(wxRGBToColour(col));
|
else
|
||||||
|
SetBackgroundColour(wxRGBToColour(col));
|
||||||
|
|
||||||
|
hr = theme->GetThemeColor(hTheme,EP_EDITTEXT,ETS_NORMAL,TMT_TEXTCOLOR,&col);
|
||||||
|
if ( FAILED(hr) )
|
||||||
|
wxLogApiError(_T("GetThemeColor(EDIT, EP_EDITTEXT, ETS_NORMAL, TMT_TEXTCOLOR)"), hr);
|
||||||
|
else
|
||||||
|
SetForegroundColour(wxRGBToColour(col));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user