Skip to content

Commit

Permalink
Adjust Linux sash drawing to match macOS
Browse files Browse the repository at this point in the history
Signed-off-by: Eran Ifrah <[email protected]>
  • Loading branch information
eranif committed Nov 16, 2024
1 parent 2ec6797 commit 422eef1
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions Plugin/cl_aui_dock_art.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -320,12 +320,18 @@ void clAuiDockArt::DrawSash(wxDC& dc, wxWindow* window, int orientation, const w

bool isDark = clSystemSettings::IsDark();
#if defined(__WXGTK__)
auto colour = isDark ? clSystemSettings::GetDefaultPanelColour().ChangeLightness(120)
: clSystemSettings::GetColour(wxSYS_COLOUR_3DFACE).ChangeLightness(80);
if (isDark) {
auto bg_colour = clSystemSettings::GetDefaultPanelColour().ChangeLightness(120);
auto light_col = bg_colour.ChangeLightness(50);
auto dark_col = bg_colour.ChangeLightness(50);
Draw3DSash(dc, rect, orientation, bg_colour, light_col, dark_col);

dc.SetPen(colour);
dc.SetBrush(colour);
dc.DrawRectangle(rect);
} else {
auto bg_colour = clSystemSettings::GetColour(wxSYS_COLOUR_3DFACE);
auto dark_col = bg_colour.ChangeLightness(60);
auto light_col = bg_colour.ChangeLightness(140);
Draw3DSash(dc, rect, orientation, bg_colour, light_col, dark_col);
}
#elif defined(__WXMAC__)
if (isDark) {
auto bg_colour = clSystemSettings::GetDefaultPanelColour().ChangeLightness(120);
Expand Down

0 comments on commit 422eef1

Please sign in to comment.