| Ticket UUID: | c6292f7bd94137f17faad7a7c130de01cd19ba0a | |||
| Title: | Use the native selection colors for listbox and ttk::treeview widgets on aqua | |||
| Type: | Patch | Version: | all | |
| Submitter: | nemethi | Created on: | 2025-12-29 19:47:38 | |
| Subsystem: | 66. Aqua Window Operations | Assigned To: | nemethi | |
| Priority: | 5 Medium | Severity: | Minor | |
| Status: | Closed | Last Modified: | 2026-02-21 20:31:03 | |
| Resolution: | Fixed | Closed By: | nemethi | |
| Closed on: | 2026-02-21 20:31:03 | |||
| Description: |
The file #define SELECT_BG "systemSelectedTextBackgroundColor" #define SELECT_FG "systemSelectedTextColor" #define DEF_LISTBOX_SELECT_COLOR SELECT_BG #define DEF_LISTBOX_SELECT_FG_COLOR SELECT_FG These colors are used not only for text, (ttk::)entry, (ttk::)spinbox, and ttk::combobox widgets, but also for listbox and ttk::treeview widgets. For the themed widgets this is due to the following lines in the file
However, the resulting appearance of the selected rows/cells of a listbox or ttk::treeview widget is different from what the mac users can see in native list and table view windows. The patch implemented in the branch I have successfully tested the proposed patch with the macOS versions 10.13.6, 10.14.6, 10.15.6, 15.7, and 26.2. Any comments are highly appreciated! | |||
| User Comments: |
nemethi (claiming to be Csaba Nemethi) added on 2026-02-21 20:31:03:
Fixed in trunk with commits [19bc3769] and [4edc873d], and in core-9-0-branch with commits [107dce5b], [4b4fd370], and [d323fc1f]. nemethi (claiming to be Csaba Nemethi) added on 2026-02-20 20:20:47: Many thanks, Jan! I can recall a discussion concerning the minimum supported macOS version. AFAIR, it was Marc who opted for 10.13 as earliest OS version to support. jan.nijtmans added on 2026-02-20 19:58:06: All tests pass on MacOS 12 MacOS 10.13 (High Sierra) is obsolete reached end-of-life status on November 12, 2020 (so 5 years ago). Many 3th-party apps don't work on it any more. I would be OK for me (for Tk 9.1) to drop support for MacOS < 10.14. I'm running MacOS 12, which went end-of-life the end of 2024. Thanks! nemethi (claiming to be Csaba Nemethi) added on 2026-02-20 17:39:39: "I successful" -> "If successful", sorry! nemethi (claiming to be Csaba Nemethi) added on 2026-02-20 17:38:11: Jan, could you repeat the test, please? I successful then I will apply the changes to core-9-0-branch, too. nemethi (claiming to be Csaba Nemethi) added on 2026-02-20 15:32:56: Many thanks, Jan! This is bad news, indeed. I have just seen your comment. I have started to fix this issue, I will commit a new version ASAP. jan.nijtmans added on 2026-02-20 14:45:17: Starting with [107dce5beb17e227|this] commit, Tk 9.0 has the same problem :-( jan.nijtmans added on 2026-02-20 14:33:05: Sorry, bad news. I see 35 new test failures on MacOS (only), here's the first one: safe.test Explanation: You cannot use $::tcl_platform(osVersion) in a safe interpreter, it doesn't exist there. nemethi (claiming to be Csaba Nemethi) added on 2026-01-09 15:33:15: Nicolas, I must first clear with Brian O'Hagan whether we can use TTK_STATE_FOCUS rather than TTK_STATE_USER1, and I am still waiting for Marc to get some time for a review. nab added on 2026-01-09 09:41:41: Hi Csaba, any chance to have this branch merged "soon" ? best regards, nicolas nemethi (claiming to be Csaba Nemethi) added on 2026-01-06 13:33:33: Kevin, many thanks for your positive feedback! Some more progress: With the commit [394fb431] we now have a greatly improved appearance on aqua, including more native-like open/close indicator colors and different default selection colors depending on whether the widget has the input focus or not. And the commit [aeb8d2cb] eliminates any conflicts with the enhanced treeview implementation by Brian O'Hagan. kevin_walzer added on 2026-01-03 17:47:41: Csaba, this looks great! The selection color on list boxes and tree views has been a long-standing annoyance - this corrects that issue very well. I'm in favor of merging to trunk and core-9-0. Are we merging ANY fixes to 8.6 at this point? If so, and it doesn't break anything else, I'm fine with merging this to that branch as well. Thanks for your great work. nemethi (claiming to be Csaba Nemethi) added on 2026-01-02 18:10:52:
I have just committed a significantly improved version of the file nemethi (claiming to be Csaba Nemethi) added on 2025-12-30 11:06:50:
Thanks Nicolas, this confirms my positive test results. I am still waiting for further feedback, especially from Marc, Kevin, Christopher, ... In case the Mac experts agree with merging the branch nab added on 2025-12-30 06:08:00: Hi Csaba, I've tried your branch for listbox and it works fine (macOS 26.2). I can open the Preferences app and change used colour and it's responsive in my app. bg and fg works accordingly best regards, nicolas | |||
Home
Timeline
Branches
Tags
Forum
Tickets
Download
Wiki