Added wxSYS_COLOUR_LISTBOXHIGHLIGHTTEXT to fix tree and list control selection rendering.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67018 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -81,6 +81,7 @@ enum wxSystemColour
|
|||||||
wxSYS_COLOUR_MENUHILIGHT,
|
wxSYS_COLOUR_MENUHILIGHT,
|
||||||
wxSYS_COLOUR_MENUBAR,
|
wxSYS_COLOUR_MENUBAR,
|
||||||
wxSYS_COLOUR_LISTBOXTEXT,
|
wxSYS_COLOUR_LISTBOXTEXT,
|
||||||
|
wxSYS_COLOUR_LISTBOXHIGHLIGHTTEXT,
|
||||||
|
|
||||||
wxSYS_COLOUR_MAX,
|
wxSYS_COLOUR_MAX,
|
||||||
|
|
||||||
|
@@ -109,6 +109,13 @@ enum wxSystemColour
|
|||||||
*/
|
*/
|
||||||
wxSYS_COLOUR_LISTBOXTEXT,
|
wxSYS_COLOUR_LISTBOXTEXT,
|
||||||
|
|
||||||
|
/**
|
||||||
|
Text colour for the unfocused selection of list-like controls.
|
||||||
|
|
||||||
|
@since 2.9.1
|
||||||
|
*/
|
||||||
|
wxSYS_COLOUR_LISTBOXHIGHLIGHTTEXT,
|
||||||
|
|
||||||
wxSYS_COLOUR_MAX
|
wxSYS_COLOUR_MAX
|
||||||
|
|
||||||
|
|
||||||
|
@@ -687,7 +687,10 @@ void wxListLineData::ApplyAttributes(wxDC *dc,
|
|||||||
else
|
else
|
||||||
colText = *wxBLACK;
|
colText = *wxBLACK;
|
||||||
#else
|
#else
|
||||||
colText = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT);
|
if ( hasFocus )
|
||||||
|
colText = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT);
|
||||||
|
else
|
||||||
|
colText = wxSystemSettings::GetColour(wxSYS_COLOUR_LISTBOXHIGHLIGHTTEXT);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else if ( attr && attr->HasTextColour() )
|
else if ( attr && attr->HasTextColour() )
|
||||||
|
@@ -2759,7 +2759,10 @@ wxGenericTreeCtrl::PaintLevel(wxGenericTreeItem *item,
|
|||||||
#ifdef __WXMAC__
|
#ifdef __WXMAC__
|
||||||
colText = *wxWHITE;
|
colText = *wxWHITE;
|
||||||
#else
|
#else
|
||||||
colText = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT);
|
if (m_hasFocus)
|
||||||
|
colText = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT);
|
||||||
|
else
|
||||||
|
colText = wxSystemSettings::GetColour(wxSYS_COLOUR_LISTBOXHIGHLIGHTTEXT);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@@ -189,6 +189,12 @@ wxColour wxSystemSettingsNative::GetColour( wxSystemColour index )
|
|||||||
color = wxColor(ListStyle()->text[GTK_STATE_NORMAL]);
|
color = wxColor(ListStyle()->text[GTK_STATE_NORMAL]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case wxSYS_COLOUR_LISTBOXHIGHLIGHTTEXT:
|
||||||
|
// This is for the text in a list control (or tree) when the
|
||||||
|
// item is selected, but not focused
|
||||||
|
color = wxColor(ListStyle()->text[GTK_STATE_ACTIVE]);
|
||||||
|
break;
|
||||||
|
|
||||||
case wxSYS_COLOUR_MENUTEXT:
|
case wxSYS_COLOUR_MENUTEXT:
|
||||||
case wxSYS_COLOUR_WINDOWTEXT:
|
case wxSYS_COLOUR_WINDOWTEXT:
|
||||||
case wxSYS_COLOUR_CAPTIONTEXT:
|
case wxSYS_COLOUR_CAPTIONTEXT:
|
||||||
|
@@ -281,6 +281,7 @@ wxColour wxSystemSettingsNative::GetColour( wxSystemColour index )
|
|||||||
}
|
}
|
||||||
return gs_objects.m_colTooltipText;
|
return gs_objects.m_colTooltipText;
|
||||||
|
|
||||||
|
case wxSYS_COLOUR_LISTBOXHIGHLIGHTTEXT:
|
||||||
case wxSYS_COLOUR_HIGHLIGHTTEXT:
|
case wxSYS_COLOUR_HIGHLIGHTTEXT:
|
||||||
if (!gs_objects.m_colHighlightText.Ok())
|
if (!gs_objects.m_colHighlightText.Ok())
|
||||||
{
|
{
|
||||||
|
@@ -128,6 +128,7 @@ wxColour wxSystemSettingsNative::GetColour(wxSystemColour index)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
case wxSYS_COLOUR_HIGHLIGHTTEXT:
|
case wxSYS_COLOUR_HIGHLIGHTTEXT:
|
||||||
|
case wxSYS_COLOUR_LISTBOXHIGHLIGHTTEXT:
|
||||||
{
|
{
|
||||||
return *wxWHITE;
|
return *wxWHITE;
|
||||||
}
|
}
|
||||||
|
@@ -133,6 +133,11 @@ wxColour wxSystemSettingsNative::GetColour(wxSystemColour index)
|
|||||||
// there is no standard colour with this index, map to another one
|
// there is no standard colour with this index, map to another one
|
||||||
index = wxSYS_COLOUR_WINDOWTEXT;
|
index = wxSYS_COLOUR_WINDOWTEXT;
|
||||||
}
|
}
|
||||||
|
else if ( index == wxSYS_COLOUR_LISTBOXHIGHLIGHTTEXT)
|
||||||
|
{
|
||||||
|
// there is no standard colour with this index, map to another one
|
||||||
|
index = wxSYS_COLOUR_HIGHLIGHTTEXT;
|
||||||
|
}
|
||||||
else if ( index == wxSYS_COLOUR_LISTBOX )
|
else if ( index == wxSYS_COLOUR_LISTBOX )
|
||||||
{
|
{
|
||||||
// there is no standard colour with this index, map to another one
|
// there is no standard colour with this index, map to another one
|
||||||
|
@@ -172,6 +172,7 @@ wxColour wxSystemSettingsNative::GetColour(
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case wxSYS_COLOUR_HIGHLIGHTTEXT:
|
case wxSYS_COLOUR_HIGHLIGHTTEXT:
|
||||||
|
case wxSYS_COLOUR_LISTBOXHIGHLIGHTTEXT:
|
||||||
vSysClr = SYSCLR_HILITEFOREGROUND;
|
vSysClr = SYSCLR_HILITEFOREGROUND;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@@ -110,6 +110,7 @@ wxColour wxSystemSettingsNative::GetColour(wxSystemColour index)
|
|||||||
break ;
|
break ;
|
||||||
|
|
||||||
case wxSYS_COLOUR_HIGHLIGHTTEXT :
|
case wxSYS_COLOUR_HIGHLIGHTTEXT :
|
||||||
|
case wxSYS_COLOUR_LISTBOXHIGHLIGHTTEXT :
|
||||||
#if wxOSX_USE_COCOA_OR_CARBON
|
#if wxOSX_USE_COCOA_OR_CARBON
|
||||||
{
|
{
|
||||||
wxColour highlightcolor( wxMacCreateCGColorFromHITheme(-3 /* kThemeBrushPrimaryHighlightColor */) );
|
wxColour highlightcolor( wxMacCreateCGColorFromHITheme(-3 /* kThemeBrushPrimaryHighlightColor */) );
|
||||||
|
@@ -76,6 +76,7 @@ wxColour wxSystemSettingsNative::GetColour(wxSystemColour index)
|
|||||||
case wxSYS_COLOUR_INACTIVEBORDER:
|
case wxSYS_COLOUR_INACTIVEBORDER:
|
||||||
case wxSYS_COLOUR_APPWORKSPACE:
|
case wxSYS_COLOUR_APPWORKSPACE:
|
||||||
case wxSYS_COLOUR_HIGHLIGHT:
|
case wxSYS_COLOUR_HIGHLIGHT:
|
||||||
|
case wxSYS_COLOUR_LISTBOXHIGHLIGHTTEXT:
|
||||||
case wxSYS_COLOUR_HIGHLIGHTTEXT:
|
case wxSYS_COLOUR_HIGHLIGHTTEXT:
|
||||||
case wxSYS_COLOUR_BTNFACE:
|
case wxSYS_COLOUR_BTNFACE:
|
||||||
case wxSYS_COLOUR_BTNSHADOW:
|
case wxSYS_COLOUR_BTNSHADOW:
|
||||||
|
@@ -78,6 +78,7 @@ wxColour wxSystemSettings::GetColour(wxSystemColour index)
|
|||||||
wxColourScheme::MAX /* wxSYS_COLOUR_MENUHILIGHT */,
|
wxColourScheme::MAX /* wxSYS_COLOUR_MENUHILIGHT */,
|
||||||
wxColourScheme::MAX /* wxSYS_COLOUR_MENUBAR */,
|
wxColourScheme::MAX /* wxSYS_COLOUR_MENUBAR */,
|
||||||
wxColourScheme::CONTROL_TEXT /* wxSYS_COLOUR_LISTBOXTEXT */,
|
wxColourScheme::CONTROL_TEXT /* wxSYS_COLOUR_LISTBOXTEXT */,
|
||||||
|
wxColourScheme::HIGHLIGHT_TEXT /* wxSYS_COLOUR_LISTBOXHIGHLIGHTTEXT */
|
||||||
};
|
};
|
||||||
|
|
||||||
wxCOMPILE_TIME_ASSERT( WXSIZEOF(s_mapSysToThemeCol) == wxSYS_COLOUR_MAX,
|
wxCOMPILE_TIME_ASSERT( WXSIZEOF(s_mapSysToThemeCol) == wxSYS_COLOUR_MAX,
|
||||||
|
Reference in New Issue
Block a user