Tk Source Code

View Ticket
Login
Ticket UUID: 5009984635a3a415f8147cfe97e353c9fe3247ce
Title: Ugly Motif-style ttk::checkbutton and ttk::radiobutton widgets in the "default" theme
Type: Bug Version: all
Submitter: nemethi Created on: 2023-05-08 15:25:43
Subsystem: 88. Themed Tk Assigned To: nobody
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2023-05-12 11:12:39
Resolution: Fixed Closed By: nemethi
    Closed on: 2023-05-12 11:12:39
Description:
The indicators of the ttk::checkbutton and ttk::radiobutton widgets of the themes "default" and "classic" are implemented in the file generic/ttk/ttkElements.c.  The implementation contains the following comment, written 20 years ago by Joe English:

"This is actually a regression from Tk 8.5 back to the ugly old Motif style; use "altTheme" for the newer, nicer version."

Since "default" is the default theme on X11, it is really a shame that its ttk::checkbutton and ttk::radiobutton widgets look so old-fashioned and even ugly, unlike their equivalents for the "vista" and "aqua" themes.

Proposed fix for this bug:

1. Keep the current implementation for the (Motif-style) "classic" theme only by moving it into the file generic/ttk/ttkClassicTheme.c.

2. Replace the relevant code in generic/ttk/ttkElements.c with a new one using fully scaling-aware SVG images that look and behave like their equivalents in the "vista" and "aqua" themes.

3. Make the necessary changes in the file library/ttk/defaults.tcl.

See the branch "new-default-indicators" for the implementation of the above steps.
User Comments: nemethi (claiming to be Csaba Nemethi) added on 2023-05-12 11:12:39:
@Harald: Many thanks again for your nice comments!  Now I am closing the ticket.

oehhar added on 2023-05-12 10:39:14:

Hi Csaba, thank you for the merge with commit [82b9f82c]. Great work ! Harald


oehhar added on 2023-05-10 12:58:00:

I think, this may be directly merged. Tk 8.7. will happily have all styles updated for new look and scalability.

Thank you, great! Harald


nemethi (claiming to be Csaba Nemethi) added on 2023-05-09 18:31:07:
Added a 4th screenshot showing the old Motif-style ttk::checkbutton and ttk::radiobutton widgets for comparison.

nemethi (claiming to be Csaba Nemethi) added on 2023-05-08 15:28:59:
Attached three screenshots demonstrating the modern look of the new indicators.

Attachments: