Tk Source Code

View Ticket
Login
Ticket UUID: 9902d8fc8e87311728c43fd8bf7dc8db0465bb65
Title: No grip element in ttk::panedwindow sashes of most built-in themes
Type: RFE Version: all
Submitter: nemethi Created on: 2025-02-03 18:01:57
Subsystem: 88. Themed Tk Assigned To: nobody
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2025-02-07 11:19:44
Resolution: Fixed Closed By: nemethi
    Closed on: 2025-02-07 11:19:44
Description:

This ticket is based on a recent posting by Harald in c.l.tcl, complaining, among others, about the fact that in the vista theme the sashes between the panes of a ttk::panedwindow widget are not visually recognizable.  As it turns out, this is valid for most built-in themes.

The attached screenshot panedwindow_clam.png contains two horizontal sashes and a vertical one, which are visually recognizable due to the grips used by the clam theme, contrary to the sashes contained in the screenshot panedwindow_default_old.png, taken with the current theme set to default.

The proposed solution, whose effect is shown in the screenshot panedwindow_default_new.png, uses a simple scaling-aware grip element placed in the middle of the sash and drawn as a rectangle filled with the darker color associated with its background color.  In addition, it makes the value of the -sashthickness option of the sash element scaling-aware.  All this holds true for all built-in themes, except clam and classic, whose behavior remains unchanged.

User Comments: nemethi (claiming to be Csaba Nemethi) added on 2025-02-07 11:19:44:

"restoring to default" --> "restoring the default", sorry for the typo!


nemethi (claiming to be Csaba Nemethi) added on 2025-02-07 10:53:03:

Thanks Francois, I have seen myself that for Tk 8.6 on the Mac the ttk::panedwindow tests fail.  The reason is that in this older Tk version on the Mac, 1 point = 1 pixel (which is a very long-standing Tk bug on the Mac), hence a sash thickness of 3.75p is translated to 4 rather than 5 pixels.  I am going to fix this by restoring to default -sashthickness value from "3.75p" to "5" (for Tk 8.6 only).


fvogel added on 2025-02-07 10:10:04:
The test suite at CI shows new failures could you please check?

nemethi (claiming to be Csaba Nemethi) added on 2025-02-06 19:31:12:

Fixed in all three branches via [adc0ea73], [c014701d], and [81773bf7]. Closing the ticket.


nemethi (claiming to be Csaba Nemethi) added on 2025-02-04 11:53:36:

Thanks for testing, Harald!

That "grey sash bar as default" is the default grip element.  Its color is mostly a variant of gray, but actually it depends on the background color of the theme.  And yes, the implementations of the clam and classic themes draw a different grip and sash handle, respectively.


oehhar added on 2025-02-04 11:08:11:
I have tested it and I am totally in favor of this change.

What I see from the code, that there are considerable changes and new properties.

What I understand:

   *   There is the grey sash bar as default for all themes
   *   Themes may overwrite this sash by other themes. The clam theme shows this.

I would love to get the opinions of others about this proposal.

THanks and take care,
Harald

oehhar added on 2025-02-04 06:33:30:
Csaba,
really great, thanks a lot !
I think, in usability, this is a big step foreward !
Cudos,
Harald

nemethi (claiming to be Csaba Nemethi) added on 2025-02-03 18:21:21:

The proposed solution is in the branch "bug-9902d8fc8e".


Attachments: