Added wxSYS_COLOUR_LISTBOXHIGHLIGHTTEXT to correct tree and list control selection rendering.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@67017 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -150,6 +150,8 @@ wxGTK:
|
||||
- Fix for missing menubar problem under some window managers where menu bar height is
|
||||
reported as 0 when the menu hasn't fully realized yet. Now updates the height during
|
||||
idle time if it is 0, otherwise no menu is shown.
|
||||
- Improved list control and tree control selection text theme compatibility by adding
|
||||
wxSYS_COLOUR_LISTBOXHIGHLIGHTTEXT colour index.
|
||||
|
||||
wxUniv:
|
||||
|
||||
|
@@ -50,11 +50,12 @@ Returns a system colour.
|
||||
\twocolitem{{\bf wxSYS\_COLOUR\_APPWORKSPACE}}{Background colour MDI applications.}
|
||||
\twocolitem{{\bf wxSYS\_COLOUR\_HIGHLIGHT}}{Item(s) selected in a control.}
|
||||
\twocolitem{{\bf wxSYS\_COLOUR\_HIGHLIGHTTEXT}}{Text of item(s) selected in a control.}
|
||||
\twocolitem{{\bf wxSYS\_COLOUR\_LISTBOXHIGHLIGHTTEXT}}{Text of the item(s) select in an unfocused list-like control.}
|
||||
\twocolitem{{\bf wxSYS\_COLOUR\_BTNFACE}}{Face shading on push buttons.}
|
||||
\twocolitem{{\bf wxSYS\_COLOUR\_BTNSHADOW}}{Edge shading on push buttons.}
|
||||
\twocolitem{{\bf wxSYS\_COLOUR\_GRAYTEXT}}{Greyed (disabled) text.}
|
||||
\twocolitem{{\bf wxSYS\_COLOUR\_BTNTEXT}}{Text on push buttons.}
|
||||
\twocolitem{{\bf wxSYS\_COLOUR\_INACTIVECAPTIONTEXT}}{Colour of text in active captions.}
|
||||
\twocolitem{{\bf wxSYS\_COLOUR\_INACTIVECAPTIONTEXT}}{Colour of text in inactive captions.}
|
||||
\twocolitem{{\bf wxSYS\_COLOUR\_BTNHIGHLIGHT}}{Highlight colour for buttons (same as wxSYS\_COLOUR\_3DHILIGHT).}
|
||||
\twocolitem{{\bf wxSYS\_COLOUR\_3DDKSHADOW}}{Dark shadow for three-dimensional display elements.}
|
||||
\twocolitem{{\bf wxSYS\_COLOUR\_3DLIGHT}}{Light colour for three-dimensional display elements.}
|
||||
|
@@ -80,6 +80,7 @@ enum wxSystemColour
|
||||
wxSYS_COLOUR_MENUHILIGHT,
|
||||
wxSYS_COLOUR_MENUBAR,
|
||||
wxSYS_COLOUR_LISTBOXTEXT,
|
||||
wxSYS_COLOUR_LISTBOXHIGHLIGHTTEXT,
|
||||
|
||||
wxSYS_COLOUR_MAX
|
||||
};
|
||||
|
@@ -75,6 +75,7 @@ wxColour wxSystemSettingsNative::GetColour(wxSystemColour index)
|
||||
return wxColour([NSColor controlShadowColor]);
|
||||
case wxSYS_COLOUR_3DLIGHT:
|
||||
return wxColour([NSColor controlHighlightColor]);
|
||||
case wxSYS_COLOUR_LISTBOXHIGHLIGHTTEXT:
|
||||
case wxSYS_COLOUR_HIGHLIGHTTEXT:
|
||||
return wxColour([NSColor selectedControlTextColor]);
|
||||
case wxSYS_COLOUR_INFOBK:
|
||||
|
@@ -1428,14 +1428,10 @@ bool wxListLineData::SetAttributes(wxDC *dc,
|
||||
}
|
||||
#else
|
||||
{
|
||||
#ifdef __WXGTK__
|
||||
if (m_owner->HasFocus())
|
||||
colText = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT);
|
||||
else
|
||||
colText = wxSystemSettings::GetColour(wxSYS_COLOUR_INACTIVECAPTIONTEXT);
|
||||
#else
|
||||
colText = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT);
|
||||
#endif
|
||||
if (m_owner->HasFocus())
|
||||
colText = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT);
|
||||
else
|
||||
colText = wxSystemSettings::GetColour(wxSYS_COLOUR_LISTBOXHIGHLIGHTTEXT);
|
||||
}
|
||||
#endif
|
||||
else if ( attr && attr->HasTextColour() )
|
||||
|
@@ -2549,16 +2549,10 @@ void wxGenericTreeCtrl::PaintLevel( wxGenericTreeItem *item, wxDC &dc, int level
|
||||
#ifdef __WXMAC__
|
||||
colText = *wxWHITE;
|
||||
#else
|
||||
|
||||
#ifdef __WXGTK__
|
||||
if (m_hasFocus)
|
||||
colText = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT);
|
||||
else
|
||||
colText = wxSystemSettings::GetColour(wxSYS_COLOUR_INACTIVECAPTIONTEXT);
|
||||
#else
|
||||
if (m_hasFocus)
|
||||
colText = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT);
|
||||
#endif
|
||||
|
||||
else
|
||||
colText = wxSystemSettings::GetColour(wxSYS_COLOUR_LISTBOXHIGHLIGHTTEXT);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
|
@@ -308,8 +308,10 @@ wxColour wxSystemSettingsNative::GetColour( wxSystemColour index )
|
||||
color = gs_objects.m_colListBoxText;
|
||||
break;
|
||||
|
||||
case wxSYS_COLOUR_INACTIVECAPTIONTEXT:
|
||||
case wxSYS_COLOUR_LISTBOXHIGHLIGHTTEXT:
|
||||
{
|
||||
// This is for the text in a list control (or tree) when the
|
||||
// item is selected, but not focused
|
||||
if (!gs_objects.m_colListBoxUnfocusedText.Ok())
|
||||
{
|
||||
if (GetColourFromGTKWidget(gdkColor, wxGTK_LIST, GTK_STATE_ACTIVE, wxGTK_TEXT))
|
||||
@@ -323,6 +325,7 @@ wxColour wxSystemSettingsNative::GetColour( wxSystemColour index )
|
||||
case wxSYS_COLOUR_MENUTEXT:
|
||||
case wxSYS_COLOUR_WINDOWTEXT:
|
||||
case wxSYS_COLOUR_CAPTIONTEXT:
|
||||
case wxSYS_COLOUR_INACTIVECAPTIONTEXT:
|
||||
case wxSYS_COLOUR_BTNTEXT:
|
||||
if (!gs_objects.m_colBtnText.Ok())
|
||||
{
|
||||
|
@@ -283,6 +283,7 @@ wxColour wxSystemSettingsNative::GetColour( wxSystemColour index )
|
||||
return gs_objects.m_colTooltipText;
|
||||
|
||||
case wxSYS_COLOUR_HIGHLIGHTTEXT:
|
||||
case wxSYS_COLOUR_LISTBOXHIGHLIGHTTEXT:
|
||||
if (!gs_objects.m_colHighlightText.Ok())
|
||||
{
|
||||
wxColour hclr = GetColour(wxSYS_COLOUR_HIGHLIGHT);
|
||||
|
@@ -106,6 +106,7 @@ wxColour wxSystemSettingsNative::GetColour(wxSystemColour index)
|
||||
break ;
|
||||
|
||||
case wxSYS_COLOUR_HIGHLIGHTTEXT :
|
||||
case wxSYS_COLOUR_LISTBOXHIGHLIGHTTEXT :
|
||||
#if 0 && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3)
|
||||
// NB: enable this case as desired
|
||||
resultColor = *wxWHITE ;
|
||||
|
@@ -128,6 +128,7 @@ wxColour wxSystemSettingsNative::GetColour(wxSystemColour index)
|
||||
}
|
||||
}
|
||||
case wxSYS_COLOUR_HIGHLIGHTTEXT:
|
||||
case wxSYS_COLOUR_LISTBOXHIGHLIGHTTEXT:
|
||||
{
|
||||
return *wxWHITE;
|
||||
}
|
||||
|
@@ -132,6 +132,11 @@ wxColour wxSystemSettingsNative::GetColour(wxSystemColour index)
|
||||
// there is no standard colour with this index, map to another one
|
||||
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 )
|
||||
{
|
||||
// there is no standard colour with this index, map to another one
|
||||
|
@@ -172,6 +172,7 @@ wxColour wxSystemSettingsNative::GetColour(
|
||||
vSysClr = SYSCLR_SCROLLBAR;
|
||||
break;
|
||||
|
||||
case wxSYS_COLOUR_LISTBOXHIGHLIGHTTEXT:
|
||||
case wxSYS_COLOUR_HIGHLIGHTTEXT:
|
||||
vSysClr = SYSCLR_HILITEFOREGROUND;
|
||||
break;
|
||||
|
@@ -76,6 +76,7 @@ wxColour wxSystemSettingsNative::GetColour(wxSystemColour index)
|
||||
case wxSYS_COLOUR_INACTIVEBORDER:
|
||||
case wxSYS_COLOUR_APPWORKSPACE:
|
||||
case wxSYS_COLOUR_HIGHLIGHT:
|
||||
case wxSYS_COLOUR_LISTBOXHIGHLIGHTTEXT:
|
||||
case wxSYS_COLOUR_HIGHLIGHTTEXT:
|
||||
case wxSYS_COLOUR_BTNFACE:
|
||||
case wxSYS_COLOUR_BTNSHADOW:
|
||||
|
@@ -84,7 +84,8 @@ wxColour wxSystemSettings::GetColour(wxSystemColour index)
|
||||
wxColourScheme::TITLEBAR_TEXT /* wxSYS_COLOUR_GRADIENTINACTIVECAPTION */,
|
||||
wxColourScheme::SHADOW_DARK /* wxSYS_COLOUR_MENUHILIGHT */,
|
||||
wxColourScheme::CONTROL /* wxSYS_COLOUR_MENUBAR */,
|
||||
wxColourScheme::CONTROL_TEXT /* wxSYS_COLOUR_LISTBOXTEXT */
|
||||
wxColourScheme::CONTROL_TEXT /* wxSYS_COLOUR_LISTBOXTEXT */,
|
||||
wxColourScheme::HIGHLIGHT_TEXT /* wxSYS_COLOUR_LISTBOXHIGHLIGHTTEXT */
|
||||
};
|
||||
|
||||
wxCHECK_MSG( index < (int)WXSIZEOF(s_mapSysToThemeCol), wxNullColour,
|
||||
|
Reference in New Issue
Block a user