summaryrefslogtreecommitdiff
path: root/wx+/no_flicker.h
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2025-01-20 19:25:18 -0500
committerB. Stack <bgstack15@gmail.com>2025-01-20 19:25:18 -0500
commitde65d3c0295894f8eafc4c7582dfe180dc58c81e (patch)
tree3ba8ec770b81468ca4ad83d985b991c5f669de22 /wx+/no_flicker.h
parentadd upstream 13.9 (diff)
downloadFreeFileSync-de65d3c0295894f8eafc4c7582dfe180dc58c81e.tar.gz
FreeFileSync-de65d3c0295894f8eafc4c7582dfe180dc58c81e.tar.bz2
FreeFileSync-de65d3c0295894f8eafc4c7582dfe180dc58c81e.zip
add upstream 14.0, depends on wx 3.3.0HEAD14.0master
Diffstat (limited to 'wx+/no_flicker.h')
-rw-r--r--wx+/no_flicker.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/wx+/no_flicker.h b/wx+/no_flicker.h
index 3d7c0ee0..b9f82349 100644
--- a/wx+/no_flicker.h
+++ b/wx+/no_flicker.h
@@ -12,7 +12,9 @@
#include <wx/textctrl.h>
#include <wx/stattext.h>
#include <wx/richtext/richtextctrl.h>
+#include <wx/settings.h>
#include <wx/wupdlock.h>
+#include "color_tools.h"
namespace zen
@@ -81,7 +83,9 @@ void setTextWithUrls(wxRichTextCtrl& richCtrl, const wxString& newText)
richCtrl.Clear();
wxRichTextAttr urlStyle;
- urlStyle.SetTextColour(*wxBLUE);
+ urlStyle.SetTextColour(enhanceContrast(*wxBLUE,
+ wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT),
+ wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW), 5 /*contrastRatioMin*/)); //W3C recommends >= 4.5
urlStyle.SetFontUnderlined(true);
for (auto& [type, text] : blocks)
bgstack15