make colours used by list and tree controls more consistent with the system theme settings; also use the correct colour for the status bar (closes #10089)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57542 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -79,6 +79,7 @@ enum wxSystemColour
|
|||||||
wxSYS_COLOUR_GRADIENTINACTIVECAPTION,
|
wxSYS_COLOUR_GRADIENTINACTIVECAPTION,
|
||||||
wxSYS_COLOUR_MENUHILIGHT,
|
wxSYS_COLOUR_MENUHILIGHT,
|
||||||
wxSYS_COLOUR_MENUBAR,
|
wxSYS_COLOUR_MENUBAR,
|
||||||
|
wxSYS_COLOUR_LISTBOXTEXT,
|
||||||
|
|
||||||
wxSYS_COLOUR_MAX
|
wxSYS_COLOUR_MAX
|
||||||
};
|
};
|
||||||
|
@@ -67,12 +67,18 @@ enum wxSystemColour
|
|||||||
wxSYS_COLOUR_3DHIGHLIGHT = wxSYS_COLOUR_BTNHIGHLIGHT,
|
wxSYS_COLOUR_3DHIGHLIGHT = wxSYS_COLOUR_BTNHIGHLIGHT,
|
||||||
wxSYS_COLOUR_3DHILIGHT = wxSYS_COLOUR_BTNHIGHLIGHT,
|
wxSYS_COLOUR_3DHILIGHT = wxSYS_COLOUR_BTNHIGHLIGHT,
|
||||||
|
|
||||||
wxSYS_COLOUR_LISTBOX,
|
wxSYS_COLOUR_LISTBOX, ///< Background colour for list-like contols.
|
||||||
wxSYS_COLOUR_HOTLIGHT,
|
wxSYS_COLOUR_HOTLIGHT,
|
||||||
wxSYS_COLOUR_GRADIENTACTIVECAPTION,
|
wxSYS_COLOUR_GRADIENTACTIVECAPTION,
|
||||||
wxSYS_COLOUR_GRADIENTINACTIVECAPTION,
|
wxSYS_COLOUR_GRADIENTINACTIVECAPTION,
|
||||||
wxSYS_COLOUR_MENUHILIGHT,
|
wxSYS_COLOUR_MENUHILIGHT,
|
||||||
wxSYS_COLOUR_MENUBAR,
|
wxSYS_COLOUR_MENUBAR,
|
||||||
|
/**
|
||||||
|
Text colour for list-like controls.
|
||||||
|
|
||||||
|
@since 2.9.0
|
||||||
|
*/
|
||||||
|
wxSYS_COLOUR_LISTBOXTEXT,
|
||||||
|
|
||||||
wxSYS_COLOUR_MAX
|
wxSYS_COLOUR_MAX
|
||||||
};
|
};
|
||||||
|
@@ -5763,7 +5763,7 @@ wxGenericListCtrl::GetClassDefaultAttributes(wxWindowVariant variant)
|
|||||||
#else
|
#else
|
||||||
wxUnusedVar(variant);
|
wxUnusedVar(variant);
|
||||||
wxVisualAttributes attr;
|
wxVisualAttributes attr;
|
||||||
attr.colFg = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT);
|
attr.colFg = wxSystemSettings::GetColour(wxSYS_COLOUR_LISTBOXTEXT);
|
||||||
attr.colBg = wxSystemSettings::GetColour(wxSYS_COLOUR_LISTBOX);
|
attr.colBg = wxSystemSettings::GetColour(wxSYS_COLOUR_LISTBOX);
|
||||||
attr.font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
|
attr.font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
|
||||||
return attr;
|
return attr;
|
||||||
|
@@ -3934,7 +3934,7 @@ wxGenericTreeCtrl::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
|
|||||||
return wxListBox::GetClassDefaultAttributes(variant);
|
return wxListBox::GetClassDefaultAttributes(variant);
|
||||||
#else
|
#else
|
||||||
wxVisualAttributes attr;
|
wxVisualAttributes attr;
|
||||||
attr.colFg = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT);
|
attr.colFg = wxSystemSettings::GetColour(wxSYS_COLOUR_LISTBOXTEXT);
|
||||||
attr.colBg = wxSystemSettings::GetColour(wxSYS_COLOUR_LISTBOX);
|
attr.colBg = wxSystemSettings::GetColour(wxSYS_COLOUR_LISTBOX);
|
||||||
attr.font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
|
attr.font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
|
||||||
return attr;
|
return attr;
|
||||||
|
@@ -185,6 +185,10 @@ wxColour wxSystemSettingsNative::GetColour( wxSystemColour index )
|
|||||||
color = wxColor(ListStyle()->base[GTK_STATE_NORMAL]);
|
color = wxColor(ListStyle()->base[GTK_STATE_NORMAL]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case wxSYS_COLOUR_LISTBOXTEXT:
|
||||||
|
color = wxColor(ListStyle()->text[GTK_STATE_NORMAL]);
|
||||||
|
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:
|
||||||
|
@@ -250,6 +250,7 @@ wxColour wxSystemSettingsNative::GetColour( wxSystemColour index )
|
|||||||
case wxSYS_COLOUR_CAPTIONTEXT:
|
case wxSYS_COLOUR_CAPTIONTEXT:
|
||||||
case wxSYS_COLOUR_INACTIVECAPTIONTEXT:
|
case wxSYS_COLOUR_INACTIVECAPTIONTEXT:
|
||||||
case wxSYS_COLOUR_BTNTEXT:
|
case wxSYS_COLOUR_BTNTEXT:
|
||||||
|
case wxSYS_COLOUR_LISTBOXTEXT:
|
||||||
if (!gs_objects.m_colBtnText.Ok())
|
if (!gs_objects.m_colBtnText.Ok())
|
||||||
{
|
{
|
||||||
int red, green, blue;
|
int red, green, blue;
|
||||||
|
@@ -127,7 +127,12 @@ wxColour wxSystemSettingsNative::GetColour(wxSystemColour index)
|
|||||||
0, // MENUBAR (unused)
|
0, // MENUBAR (unused)
|
||||||
};
|
};
|
||||||
|
|
||||||
if ( index == wxSYS_COLOUR_LISTBOX )
|
if ( index == wxSYS_COLOUR_LISTBOXTEXT)
|
||||||
|
{
|
||||||
|
// there is no standard colour with this index, map to another one
|
||||||
|
index = wxSYS_COLOUR_WINDOWTEXT;
|
||||||
|
}
|
||||||
|
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
|
||||||
index = wxSYS_COLOUR_WINDOW;
|
index = wxSYS_COLOUR_WINDOW;
|
||||||
|
@@ -75,6 +75,7 @@ wxColour wxSystemSettingsNative::GetColour(wxSystemColour index)
|
|||||||
case wxSYS_COLOUR_CAPTIONTEXT:
|
case wxSYS_COLOUR_CAPTIONTEXT:
|
||||||
case wxSYS_COLOUR_INFOTEXT:
|
case wxSYS_COLOUR_INFOTEXT:
|
||||||
case wxSYS_COLOUR_INACTIVECAPTIONTEXT:
|
case wxSYS_COLOUR_INACTIVECAPTIONTEXT:
|
||||||
|
case wxSYS_COLOUR_LISTBOXTEXT:
|
||||||
resultColor = *wxBLACK;
|
resultColor = *wxBLACK;
|
||||||
break ;
|
break ;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user