Skip to content

Commit

Permalink
Fix compilation on windows with wxWidget version < v3.3.0 (unreleased…
Browse files Browse the repository at this point in the history
…). (#3361)

- `SelectLightDark()` and `MSWEnableDarkMode` will be added in v3.3.0.
  • Loading branch information
Jarod42 committed May 15, 2024
1 parent 99fb1c7 commit 7f7adb2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion LiteEditor/app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ bool CodeLiteApp::OnInit()

::wxInitAllImageHandlers();

#if defined(__WXMSW__) && !defined(_MSC_VER)
#if defined(__WXMSW__) && wxCHECK_VERSION(3, 3, 0)
if (clConfig::Get().Read("CodeLiteAppearance", 0) == 1) {
// force dark
MSWEnableDarkMode(wxApp::DarkMode_Always);
Expand Down
4 changes: 4 additions & 0 deletions Plugin/drawingutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,11 @@ wxBrush DrawingUtils::GetStippleBrush()
wxColour bgColour = clSystemSettings::GetColour(wxSYS_COLOUR_3DFACE);
wxBitmap bmpStipple(3, 3);
wxColour lightPen = bgColour.ChangeLightness(105);
#if wxCHECK_VERSION(3, 3, 0)
wxColour darkPen = clSystemSettings::Get().SelectLightDark(bgColour.ChangeLightness(95), *wxBLACK);
#else
wxColour darkPen = clSystemSettings::Get().IsDark() ? bgColour.ChangeLightness(95) : *wxBLACK;
#endif
#else
wxColour bgColour = clSystemSettings::GetDefaultPanelColour();
wxBitmap bmpStipple(3, 3);
Expand Down

0 comments on commit 7f7adb2

Please sign in to comment.