Fixing inactive state drawing, and removing warning.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44071 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Kevin Ollivier 2006-12-28 17:50:53 +00:00
parent 44038f9a6c
commit defeae282f

View File

@ -1946,7 +1946,6 @@ long wxListCtrl::InsertItem(wxListItem& info)
info.m_itemId = count;
m_dbImpl->MacInsertItem(info.m_itemId, &info );
wxMacDataItem* dataItem = m_dbImpl->GetItemFromLine(info.m_itemId);
wxListEvent event( wxEVT_COMMAND_LIST_INSERT_ITEM, GetId() );
event.SetEventObject( this );
@ -2622,10 +2621,17 @@ void wxMacDataBrowserListCtrlControl::DrawItem(
{
GetThemeDrawingState(&savedState);
GetThemeBrushAsColor(kThemeBrushAlternatePrimaryHighlightColor, 32, true, &backgroundColor);
GetThemeTextColor(kThemeTextColorWhite, gdDepth, colorDevice, &labelColor);
if (active)
{
GetThemeBrushAsColor(kThemeBrushAlternatePrimaryHighlightColor, 32, true, &backgroundColor);
GetThemeTextColor(kThemeTextColorWhite, gdDepth, colorDevice, &labelColor);
}
else
{
GetThemeBrushAsColor(kThemeBrushSecondaryHighlightColor, 32, true, &backgroundColor);
GetThemeTextColor(kThemeTextColorBlack, gdDepth, colorDevice, &labelColor);
}
CGContextSaveGState(context);
CGContextSetRGBFillColor(context, (float)backgroundColor.red / (float)USHRT_MAX,
@ -2642,7 +2648,7 @@ void wxMacDataBrowserListCtrlControl::DrawItem(
labelColor = MAC_WXCOLORREF( color.GetPixel() );
else if (list->GetTextColour().Ok())
labelColor = MAC_WXCOLORREF( list->GetTextColour().GetPixel() );
if (bgColor.Ok())
{
backgroundColor = MAC_WXCOLORREF( bgColor.GetPixel() );
@ -3175,3 +3181,4 @@ void wxMacListCtrlItem::SetColumnInfo( unsigned int column, wxListItem* item )
}
#endif // wxUSE_LISTCTRL