From 2ea7090de20910b0a5f5a8279748270b8c5ce474 Mon Sep 17 00:00:00 2001 From: mimi89999 Date: Tue, 14 Jul 2020 21:05:11 +0200 Subject: [PATCH] Change AUI panel button color to wxSYS_COLOUR_BTNTEXT This colour is more appropriate when using wxGTK and is the same as the previously used wxSYS_COLOUR_CAPTIONTEXT in wxOSX and should be also a good choice for wxMSW. Closes https://github.com/wxWidgets/wxWidgets/pull/1966 --- src/aui/auibar.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/aui/auibar.cpp b/src/aui/auibar.cpp index 603c9e718d..f97bf53adb 100644 --- a/src/aui/auibar.cpp +++ b/src/aui/auibar.cpp @@ -160,12 +160,12 @@ void wxAuiGenericToolBarArt::UpdateColoursFromSystem() static const unsigned char overflowBits[] = { 0x80, 0xff, 0x80, 0xc1, 0xe3, 0xf7 }; m_buttonDropDownBmp = wxAuiBitmapFromBits(buttonDropdownBits, 5, 3, - wxSystemSettings::GetColour(wxSYS_COLOUR_CAPTIONTEXT)); + wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT)); m_disabledButtonDropDownBmp = wxAuiBitmapFromBits( buttonDropdownBits, 5, 3, wxColor(128,128,128)); m_overflowBmp = wxAuiBitmapFromBits(overflowBits, 7, 6, - wxSystemSettings::GetColour(wxSYS_COLOUR_CAPTIONTEXT)); + wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT)); m_disabledOverflowBmp = wxAuiBitmapFromBits(overflowBits, 7, 6, wxColor(128,128,128)); } @@ -241,7 +241,7 @@ void wxAuiGenericToolBarArt::DrawLabel( const wxRect& rect) { dc.SetFont(m_font); - dc.SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_CAPTIONTEXT)); + dc.SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT)); // we only care about the text height here since the text // will get cropped based on the width of the item @@ -351,7 +351,7 @@ void wxAuiGenericToolBarArt::DrawButton( dc.DrawBitmap(bmp, bmpX, bmpY, true); // set the item's text color based on if it is disabled - dc.SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_CAPTIONTEXT)); + dc.SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT)); if (item.GetState() & wxAUI_BUTTON_STATE_DISABLED) { dc.SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT)); @@ -481,7 +481,7 @@ void wxAuiGenericToolBarArt::DrawDropDownButton( dc.DrawBitmap(dropbmp, dropBmpX, dropBmpY, true); // set the item's text color based on if it is disabled - dc.SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_CAPTIONTEXT)); + dc.SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT)); if (item.GetState() & wxAUI_BUTTON_STATE_DISABLED) { dc.SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT)); @@ -524,7 +524,7 @@ void wxAuiGenericToolBarArt::DrawControlLabel( return; // set the label's text color - dc.SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_CAPTIONTEXT)); + dc.SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT)); textX = rect.x + (rect.width/2) - (textWidth/2) + 1; textY = rect.y + rect.height - textHeight - 1;