From d6ff70a7da6632abd9393a2348558c33e267e202 Mon Sep 17 00:00:00 2001 From: Mooneer Salem Date: Thu, 5 Jun 2025 12:39:18 -0700 Subject: [PATCH] FreeDV Reporter: Force explicit background color when not highlighted. (#911) * FreeDV Reporter: Force explicit background color when not highlighted. * Add PR #911 to changelog. --- USER_MANUAL.md | 1 + src/gui/dialogs/freedv_reporter.cpp | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/USER_MANUAL.md b/USER_MANUAL.md index 9e93461d..fed0e4c4 100644 --- a/USER_MANUAL.md +++ b/USER_MANUAL.md @@ -795,6 +795,7 @@ LDPC | Low Density Parity Check Codes - a family of powerful FEC codes 1. Bugfixes: * Reduce latency when going between TX->RX with Hamlib configured. (PR #893) * Reduce usage of non-real time safe code. (PR #900) + * FreeDV Reporter: Force explicit background color (avoids unwanted mouseover highlights on Linux). (PR #911) * Fix compiler errors when using wxWidgets 3.0. (PR #914) ## V2.0.0 June 2025 diff --git a/src/gui/dialogs/freedv_reporter.cpp b/src/gui/dialogs/freedv_reporter.cpp index 522a59d3..0e59ae77 100644 --- a/src/gui/dialogs/freedv_reporter.cpp +++ b/src/gui/dialogs/freedv_reporter.cpp @@ -740,8 +740,8 @@ void FreeDVReporterDialog::FreeDVReporterDataModel::updateHighlights() reportData->lastUpdateUserMessage.ToUTC().IsEqualUpTo(curDate, wxTimeSpan(0, 0, MSG_COLORING_TIMEOUT_SEC)); // Messaging notifications take highest priority. - wxColour backgroundColor; - wxColour foregroundColor; + wxColour backgroundColor = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW); + wxColour foregroundColor = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT); if (isMessaging) { @@ -2001,6 +2001,18 @@ void FreeDVReporterDialog::FreeDVReporterDataModel::onUserConnectFn_(std::string temp->lastRxMode = UNKNOWN_STR; temp->snr = UNKNOWN_STR; + // Default to sane colors for rows. If we need to highlight, the timer will change + // these later. + // +#if defined(__APPLE__) + // To ensure that the columns don't have a different color than the rest of the control. + // Needed mainly for macOS. + temp->backgroundColor = wxColour(wxTransparentColour); +#else + temp->backgroundColor = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW); +#endif // defined(__APPLE__) + temp->foregroundColor = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT); + auto lastUpdateTime = makeValidTime_(lastUpdate, temp->lastUpdateDate); temp->lastUpdate = lastUpdateTime; temp->connectTime = temp->lastUpdateDate;