Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Change color of ttk::notebook tabs in macOS

90 views
Skip to first unread message

welle ozean

unread,
Sep 13, 2020, 2:25:09 PM9/13/20
to
I need to adapt the appearance of the tabs of tsk:notebook on macOS Big Sur (waiting for a stable release of the Tk mac_style branch).

In particular I need to change the color of the selected tab, either the foreground or the background

ttk::style configure TNotebook.Tab -foreground red (changes the non selected tabs)
ttk::style configure TNotebook.Tab -background red (no effect)

Any idea?

Thank you.
Welle

Christopher Chavez

unread,
Sep 13, 2020, 2:49:38 PM9/13/20
to
If you are using the Ttk Aqua theme ([ttk::style theme use] eq "aqua"), you are probably out of luck. I have been recently told that platform-specific/native Ttk themes intentionally limit customization support, in order to remain consistent with platform appearance. See https://core.tcl-lang.org/tk/info/3eb2a8df64 and https://core.tcl-lang.org/tk/info/b46642fe3b

However, if a widget using a native Ttk theme is inconsistent with platform appearance (and seems to require customization to make it consistent), then that is arguably a bug.

Christopher A. Chavez

welle ozean

unread,
Sep 13, 2020, 2:55:51 PM9/13/20
to
Thank you, Christopher. In this case I will open a bug report in Tk Source Code. I guess I will be pointed to the mac_style branch. Let's see.

Welle

Brad Lanam

unread,
Sep 13, 2020, 3:15:29 PM9/13/20
to
On Sunday, September 13, 2020 at 11:55:51 AM UTC-7, welle ozean wrote:
> Thank you, Christopher. In this case I will open a bug report in Tk Source Code. I guess I will be pointed to the mac_style branch. Let's see.
>
> Welle

The notebook tab should take on the system accent color (in the mac_styles)
branch. And for the aqua theme, that's the only color change that is allowed.
0 new messages