From 40a2623647d79e4a24dfa188c8aad1aff6e00326 Mon Sep 17 00:00:00 2001 From: lsv Date: Sat, 4 Jan 2025 23:03:55 +0500 Subject: [PATCH] Fixed the background of the line title where the cursor is located. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Изменение фона заголовка строки с курсором более корректное. --- ctl/ctlSQLGrid.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ctl/ctlSQLGrid.cpp b/ctl/ctlSQLGrid.cpp index 4aa460e..0834aec 100644 --- a/ctl/ctlSQLGrid.cpp +++ b/ctl/ctlSQLGrid.cpp @@ -95,7 +95,14 @@ void ctlSQLGrid::DrawRowLabel(wxDC& dc, int row) { else { //wxColour c = wxSystemSettings::GetColour(wxSYS_COLOUR_BTNHIGHLIGHT); wxColour c = GetGridRowLabelWindow()->GetBackgroundColour(); - wxColour c3(c.Red()+15,c.Green()+15,c.Blue()+15); + int d = 20; + int r = c.GetRed() + d; int g = c.GetGreen() + d; int b = c.GetBlue() + d; + if (r > 255 || g > 255 || b > 255) { + r = r - 2 * d; + g = g - 2 * d; + b = b - 2 * d; + } + wxColour c3(r, g, b); wxDCBrushChanger setBrush(dc, c3); wxDCPenChanger setPen(dc, *wxTRANSPARENT_PEN); wxRect rect(0, GetRowTop(row), GetRowLabelSize(), GetRowHeight(row));