| Ticket UUID: | 011533811758269de23a3e874f3ca9f326bab1f3 | |||
| Title: | Flip ttk::notebook tab states "first" and "last" for "-tabplacement e*|s*" | |||
| Type: | Bug | Version: | all | |
| Submitter: | nemethi | Created on: | 2026-04-08 14:30:29 | |
| Subsystem: | 88. Themed Tk | Assigned To: | nemethi | |
| Priority: | 5 Medium | Severity: | Minor | |
| Status: | Closed | Last Modified: | 2026-04-14 16:41:36 | |
| Resolution: | Fixed | Closed By: | nemethi | |
| Closed on: | 2026-04-14 16:41:36 | |||
| Description: |
The ttk::notebook implementation (function It turns out that currently the function The fix, proposed by Christian and implemented in the branch | |||
| User Comments: |
chw added on 2026-04-14 15:57:46:
¡Csaba, muchas gracias por tu valioso apoyo! nemethi (claiming to be Csaba Nemethi) added on 2026-04-14 15:46:01: Fixed by commits [9a851511], [066c5134], and [d64f145a] to main, core-9-0-branch, and core-8-6-branch. chw added on 2026-04-12 05:10:04: Csaba, much better approach! Now it looks quite good on Windows. What about beginning to merge it starting with ye goode olde 8.6 steam engine? A TIP is not needed, since all these changes are fixes of longstanding visual glitches. nemethi (claiming to be Csaba Nemethi) added on 2026-04-11 16:20:01: Christian, many thanks for your valuable input! I have just committed updated versions of the files ttkWinTheme.c and ttkWinVistaTheme.c. In ttkWinTheme.c I made a few necessary changes, taking into account that the data of the rectangle to be passed to the DrawEdge() function depend on the sticky bit of the tab placement. With your original code there were missing pixels in the edge drawn by this function. In ttkWinVistaTheme.c I chose a different approach than you. Besides being simpler, my code also eliminates a gap created by your method below the rightmost tab of the first notebook in the 3rd row of your example script. chw added on 2026-04-11 07:58:39: And here is the third attempt: https://androwish.org/home/info/545391a7744a669e chw added on 2026-04-10 18:20:21: An update to my first attempt, the second source, so to speak: https://androwish.org/home/info/57350cc5ec6ac5d4 This was necessary due to testing with your nbtest.tcl times 2, which I attach as nbtest8.tcl to this ticket. It basically permutes the -tabposition/-tabplacement options further, BTW still without using all combinations times more than one row/column. So most likely we have many little visual deficiencies to discover. chw added on 2026-04-10 10:43:43: Csaba, thanks for your improvements. However, the 3D border effect needs more polishing, see my first attempt in this check-in https://androwish.org/home/info/e19da7dd70b66ca7 Affected themes: alt, classic, default, winnative. Untested is the behavior for tabs distributed upon more rows/columns. oehhar added on 2026-04-09 12:20:05: More background to this ticket started is in [23f52946] (Androwish pointer). nemethi (claiming to be Csaba Nemethi) added on 2026-04-09 11:44:32:
Christian, I have just uploaded a new version of the test script set themeList [ttk::style theme names] because the branch The styling options To your question regarding the pixel-based themes: I would recommend to try the same method as the one applied to the built-in themes: After setting the notebook style's chw added on 2026-04-08 18:21:13: Thanks for bringing this topic forward, it will improve Tk's look even more tremendously when Emiliano's angled text will be included later. The nbtest.tcl test script is very valuable. Would you improve it by using "package require opt" right after "package require Tk" (to update the package list) and setting the "themeList" variable by "ttk::themes" instead of "ttk::style theme names" (to get all packaged themes in the option menu). Now for my observation: with many pixel-based themes (e.g. awarc, awbreeze, awwinxpblue, keramik, plastik, droid) most non-standard tab layouts are somehow broken. Do you have an idea how this can be fixed, generally and hopefully easily? nemethi (claiming to be Csaba Nemethi) added on 2026-04-08 14:39:26:
Attached the sample script | |||
Attachments:
- nbtest8.tcl [download] added by chw on 2026-04-10 18:20:40. [details]
- nbtest.tcl [download] added by nemethi on 2026-04-09 09:47:44. [details]
- nbtest_clam_GOD.png [download] added by nemethi on 2026-04-08 14:34:39. [details]
- nbtest_clam_BAD.png [download] added by nemethi on 2026-04-08 14:31:04. [details]
