diff --git a/src/ui/ribbon/artmetro.cpp b/src/ui/ribbon/artmetro.cpp index 2a4f785d..054a1fc5 100644 --- a/src/ui/ribbon/artmetro.cpp +++ b/src/ui/ribbon/artmetro.cpp @@ -32,10 +32,12 @@ Adaptation of ribbon art provider by user "iwbnwif" from: #ifdef __WXMSW__ #include #endif +#include "../../base/colorbrewer.h" using namespace Wisteria::UI; using namespace Wisteria::GraphItems; using namespace Wisteria::Icons; +using namespace Wisteria::Colors; RibbonMetroArtProvider::RibbonMetroArtProvider(bool set_colour_scheme) : wxRibbonMSWArtProvider (set_colour_scheme) @@ -902,8 +904,13 @@ void RibbonMetroArtProvider::DrawButtonBarButtonForeground( const wxBitmap& bitmap_large, const wxBitmap& bitmap_small) { - const wxColour paintingColour = (state & wxRIBBON_BUTTONBAR_BUTTON_HOVER_MASK) ? + wxColour paintingColour = (state & wxRIBBON_BUTTONBAR_BUTTON_HOVER_MASK) ? m_tab_highlight_colour : m_button_bar_label_colour; + + if (state & wxRIBBON_BUTTONBAR_BUTTON_TOGGLED) + { + paintingColour = Colors::ColorContrast::BlackOrWhiteContrast(m_page_toggle_face_colour); + } wxDCTextColourChanger cc(dc, paintingColour); switch (state & wxRIBBON_BUTTONBAR_BUTTON_SIZE_MASK)