From 7485964f68e5647c5a31e267ce3a8d2b059ca031 Mon Sep 17 00:00:00 2001 From: frang75 Date: Thu, 4 Apr 2024 20:49:09 +0200 Subject: [PATCH] Fix macOS ListBox/TableView select color --- Changelog.md | 4 +++- prj/build.txt | 2 +- src/osgui/osx/osglobals.m | 4 ++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Changelog.md b/Changelog.md index 9b4d7c9..b052b07 100644 --- a/Changelog.md +++ b/Changelog.md @@ -6,11 +6,13 @@ * WindowsXP TableView/ListBox select colors. [Commit](https://github.com/frang75/nappgui_src/commit/fd0983ff06cbea190a543e9f119e749c436b954d). +* macOS TableView/ListBox select colors. [Isssue](https://github.com/frang75/nappgui_src/issues/115). + ### Improved * `gui_text_t` properties in private API. [Commit](https://github.com/frang75/nappgui_src/commit/579766ab451eb445ce5013a93892261997137706). -* `str_splits()` adds a new `add_empty` parameters. [Issue](https://github.com/frang75/nappgui_src/issues/124). [Doc](https://nappgui.com/en/core/string.html#f52) +* `str_splits()` adds a new `add_empty` parameter. [Issue](https://github.com/frang75/nappgui_src/issues/124). [Doc](https://nappgui.com/en/core/string.html#f52). [Commit](https://github.com/frang75/nappgui_src/commit/845c4c01ca282abbe6751ed51cb6a28b1860076f). ## v1.4.1 - Apr 3, 2024 (r4993) diff --git a/prj/build.txt b/prj/build.txt index 2fa6609..e8df129 100644 --- a/prj/build.txt +++ b/prj/build.txt @@ -1 +1 @@ -5007 +5012 diff --git a/src/osgui/osx/osglobals.m b/src/osgui/osx/osglobals.m index 15bc632..c8bbb29 100644 --- a/src/osgui/osx/osglobals.m +++ b/src/osgui/osx/osglobals.m @@ -106,7 +106,11 @@ static void i_theme_colors(void) /* Text background color (normal, selected, mouse over */ oscolor_NSColor_rgba_v([NSColor controlColor], i_BACK_COLOR); +#if defined(MAC_OS_X_VERSION_10_14) && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_14 + oscolor_NSColor_rgba_v([NSColor selectedContentBackgroundColor], i_SELBG_COLOR); +#else oscolor_NSColor_rgba_v([NSColor selectedControlColor], i_SELBG_COLOR); +#endif oscolor_NSColor_rgba_v([NSColor controlColor], i_HOTBG_COLOR); /* Text background color in not active windows (normal, selected, mouse over */