Skip to content

Commit

Permalink
Fixed: under Windows 11: side bar icons are dimmed (when dark mode is…
Browse files Browse the repository at this point in the history
… used)

Signed-off-by: Eran Ifrah <[email protected]>
  • Loading branch information
eranif committed Jan 6, 2025
1 parent 82ba6c5 commit fadd8bd
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions Plugin/clSideBarCtrl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,11 +223,7 @@ void clSideBarCtrl::AddTool(const wxString& label, const wxString& bmpname, size
clWARNING() << "clSideBarCtrl::AddPage(): Invalid bitmap:" << bmpname << endl;
}

const wxBitmap& bmp = clSystemSettings::GetAppearance().IsDark()
// Under Windows 11, the toolbar selection is "very light"
// so use the light theme bitmap
? (IsWindows11DarkMode() ? light_theme_bmp : dark_theme_bmp)
: light_theme_bmp;
const wxBitmap& bmp = clSystemSettings::GetAppearance().IsDark() ? dark_theme_bmp : light_theme_bmp;

auto tool = m_toolbar->AddTool(wxID_ANY, label, wxBitmapBundle(bmp), label, wxITEM_CHECK);
auto tool_id = tool->GetId();
Expand Down

0 comments on commit fadd8bd

Please sign in to comment.