|
2026-03-24
| ||
| 07:55 | • Ticket [cf296ac8] macOS: ttk::notebook tabs status still Open with 4 other changes artifact: 14ccbeab user: jan.nijtmans | |
| 07:10 | • Ticket [cf296ac8]: 3 changes artifact: dddf3414 user: nab | |
|
2025-12-17
| ||
| 22:02 | • Ticket [cf296ac8]: 3 changes artifact: 6e40902c user: nab | |
|
2025-11-22
| ||
| 09:34 | • Ticket [cf296ac8]: 3 changes artifact: 8147823d user: nab | |
|
2025-11-12
| ||
| 10:04 | • Ticket [cf296ac8]: 3 changes artifact: 89614992 user: nab | |
|
2025-11-11
| ||
| 15:55 | • Ticket [cf296ac8]: 5 changes artifact: fcb5817c user: nemethi | |
|
2025-11-09
| ||
| 19:01 | • Ticket [cf296ac8]: 4 changes artifact: c999cbc8 user: nemethi | |
| 14:01 | • Ticket [cf296ac8]: 5 changes artifact: e422851b user: nemethi | |
| 13:44 | Fix for bug [cf296ac849]: macOS: ttk::notebook tabs. check-in: 0dfc6cb1 user: csaba tags: core-9-0-branch, core-9-0-3-rc | |
|
2025-10-23
| ||
| 14:04 | • Ticket [cf296ac8] macOS : ttk::notebook tabs status still Open with 3 other changes artifact: ec573854 user: nab | |
| 13:54 | • Ticket [cf296ac8]: 4 changes artifact: be12ae18 user: marc_culler | |
|
2025-10-22
| ||
| 02:11 | • Add attachment revisedBounds.png to ticket [cf296ac8] artifact: f0a0a24d user: nab | |
| 02:11 | • Add attachment revisedClip.png to ticket [cf296ac8] artifact: a265b76d user: nab | |
| 02:10 | • Add attachment actualCode.png to ticket [cf296ac8] artifact: 5de3132f user: nab | |
| 02:10 | • New ticket [cf296ac8] macOS : ttk::notebook tabs. artifact: 499901eb user: nab | |
| Ticket UUID: | cf296ac849da8ab0e02f4d62f31123b93d7625b6 | |||
| Title: | macOS: ttk::notebook tabs | |||
| Type: | RFE | Version: | trunk | |
| Submitter: | nab | Created on: | 2025-10-22 02:10:41 | |
| Subsystem: | 02. Appearance | Assigned To: | marc_culler | |
| Priority: | 5 Medium | Severity: | Minor | |
| Status: | Open | Last Modified: | 2026-03-24 07:55:31 | |
| Resolution: | Fixed | Closed By: | nobody | |
| Closed on: | ||||
| Description: |
Hi Marc,
I've started to use ttk::notebook in my app and there's something wrong with how tabs are displayed.
you can see this with the widget tour / special widgets for macOS
specifically in dark mode.
I'm attaching 3 picts to this ticket where the one called actualCode is as it is now. as you can see the latest tab is truncated.
playing with macosx/ttkMacOSXTheme.c in function DrawTab11(), if I set
clipRect.size.width += 5;
in the if (!(state & TTK_STATE_FIRST)) condition, it's better, last tab is not truncated.
this is the pict revisedClip
now if I completely change bounds and clip like that:
if (!(state & TTK_STATE_FIRST)) {
clipRect.origin.x += 0.5;
clipRect.size.width -= 0.5;
bounds.origin.x += 0.5;
bounds.size.width -= 0.5;
}
if (!(state & TTK_STATE_LAST)) {
clipRect.size.width -= 0.5;
bounds.size.width -= 0.5;
}
tabs are well displayed (not truncated) and not overlapping. it's the pict called revisedBounds.
last one is my favorite
best regards,
nicolas
| |||
| User Comments: |
jan.nijtmans added on 2026-03-24 07:55:31:
> But we should wait for Marc's opinion, and until then keep the ticket open Marc, can you comment? nab added on 2026-03-24 07:10:58: Hi, does this thing can be merged to trunk ? best regards, nicolas nab added on 2025-12-17 22:02:20: Csaba have found (and I can confirm) that removing whole bounds and clip gives perfect result.
here's the diff :
--- /Users/nico/Downloads/tk-20251217213734-8523dc14b0/macosx/ttkMacOSXTheme.c 2025-12-17 22:37:34
+++ /Users/nico/daylight/lib/distrib/tk-20251217194336-8d7ed4ad27/macosx/ttkMacOSXTheme.c 2025-12-17 22:55:17
@@ -1551,16 +1551,6 @@
* rounded rectangle behind the entire tab bar.
*/
- if (!(state & TTK_STATE_FIRST)) {
- clipRect.origin.x -= 5;
- bounds.origin.x -= 5;
- clipRect.size.width += 5;
- bounds.size.width += 5;
- }
- if (!(state & TTK_STATE_LAST)) {
- clipRect.size.width += 5;
- bounds.size.width += 5;
- }
CGContextSaveGState(context);
CGContextClipToRect(context, clipRect);
DrawGroupBox(bounds, context, tkwin, 3, NO);
it would be very nice to have those changes in trunk
++
nicolas
nab added on 2025-11-22 09:34:04: Hi Marc, would you mind give a try to this please. best regards, nicolas nab added on 2025-11-12 10:04:24: Hi Csaba, thank you for taking care of this. With your code, tabs are overlapping (here on macOS26). I still prefer my version :) best regards, nicolas nemethi (claiming to be Csaba Nemethi) added on 2025-11-11 15:55:18: The same fix is now in trunk, too (see [e2e88a72]). But we should wait for Marc's opinion, and until then keep the ticket open. nemethi (claiming to be Csaba Nemethi) added on 2025-11-09 19:01:12:
A couple of remarks:
nemethi (claiming to be Csaba Nemethi) added on 2025-11-09 14:01:57: Nicolas, I have committed your change that results in the screenshot revisedClip.png to the core-9-0-branch only (see [0dfc6cb1]). The main branch (trunk) is currently broken, hence any new commit to it should be postponed until it is usable again. Your second proposal (resulting in the screenshot revisedBounds.png looks quite promising, but IMHO we should wait for Marc before taking any further action. nab added on 2025-10-23 14:04:09: Hi Marc, I don't know, I never use light mode in my app... maybe it's just less obvious. ++ marc_culler (claiming to be Marc Culler) added on 2025-10-23 13:54:42: Hi Nicolas, that looks like an improvement. I don't understand why dark mode would behave any differently than lignt mode. What do you think accounts for that? Is there actually a difference? | |||
Attachments:
- revisedBounds.png [download] added by nab on 2025-10-22 02:11:15. [details]
- revisedClip.png [download] added by nab on 2025-10-22 02:11:05. [details]
- actualCode.png [download] added by nab on 2025-10-22 02:10:56. [details]
