Tk Source Code

View Ticket
Login
Ticket UUID: 6ec00a7dc944200f658f6ab8eba64928385d0a69
Title: Improve the appearance of the built-in themes
Type: Patch Version: trunk
Submitter: nemethi Created on: 2023-08-22 16:16:27
Subsystem: 88. Themed Tk Assigned To: nobody
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2023-09-11 12:44:24
Resolution: Fixed Closed By: nemethi
    Closed on: 2023-09-11 12:44:24
Description:
The branch "improved_themes" contains the following changes in a few generic/ttk/*.c and library/ttk/*.tcl files:

1. Fixed the misplacement of the ttk::combobox arrows in the "default" and "alt" themes.  The arrows appear now centered, like in all the other themes.

2. The ttk::scale widget of the "default" theme no longer has the old-fashioned Motif-style look, but a nice modern appearance, inspired by the native widgets on macOS, Widows 11, GNOME, and KDE.

3. The same holds true for the ttk::progressbar widget of the "default" theme.  Now it is thin, like the corresponding native widgets on the above-mentioned desktops.  In addition, the value of its -borderwidth style option (which refers to its selection-like inner part) was changed from 1 to 0.

4. In the "default" and "alt themes", the border of ttk::entry widget having the input focus now appears as a focus ring, like in the themes "aqua", "vista", and "clam", as well as like in the case of the corresponding native widgets on the above-mentioned desktops.

5. Since it is no longer considered as modern to have selections with 3D look, the value of the -selectborderwidth style option in the "default" theme was changed from 1 to 0.

6. Fixed several bugs in the C code and the Tcl scripts, especially in the file library/ttk/defaults.tcl.

Please take a look at the attached PNG file.  The screenshots shown in its left half were made by running a script with Tk 8.7a5, and the ones in its right half were created by running the same script with Tk built from the branch "improved_themes".  The modern-looking, scaling-aware ttk::checkbutton and ttk::radiobutton widgets are the result of older commits into trunk.  Not shown in these screenshots but for completeness worth mentioning is that -- due to a commit into trunk 10 days ago -- the ttk::menubutton widget of the "default" theme no longer has the Motif-style indicator, but the same scaling-aware down-arrow as in the "clam" theme.  Consequently, the Motif legacy is now present in the "classic" theme only.

The motivation for this branch was to improve the appearance of the built-in theme "default" (and partly that of "alt"), thus making Tk (especially on X11) more appealing.  Comments are highly appreciated!
User Comments: nemethi (claiming to be Csaba Nemethi) added on 2023-09-11 12:44:24:

Forget the attachment screenshots3.png, which reveals a regression in the drawing of the ttk::notebook tab element, introduced in [9f365170]. That regression is now fixed, and I have attached updated screenshots (screenshots4.png).


nemethi (claiming to be Csaba Nemethi) added on 2023-09-10 19:02:34:

Update: The commmit [4f62037b] provides further improvements related to the look of the ttk::combobox and ttk::spinbox widgets in the themes "default" and "alt". Attached updated screenshots.


nemethi (claiming to be Csaba Nemethi) added on 2023-08-26 14:23:17:
Set resolution to "Fixed"

nemethi (claiming to be Csaba Nemethi) added on 2023-08-26 14:21:26:
Closing the ticket.

nemethi (claiming to be Csaba Nemethi) added on 2023-08-23 18:10:38:
Update: Just committed code that improves the appearance of the ttk::scrollbar widget in the themes "default" and "alt".  Attaching updated screenshots.

nemethi (claiming to be Csaba Nemethi) added on 2023-08-23 08:12:06:
@Emiliano: ttk::entry does have the same border as ttk::combobox and ttk::spinbox.  The focus ring appears only if the entry has the input focus, just like in the themes "aqua", "vista", and "clam".  Native input widgets on modern desktops behave the same.

My goal with these changes was not to provide a new theme, but to improve the built-in ones.  We have already about 60 (!) themes.  IMHO, what we need is more appealing built-in themes in first place rather than even more new ones.

oehhar added on 2023-08-23 07:57:37:

Emiliano, thanks for your question: "why not provide these changes as a new theme?"

I am personaly not in favor to provide it as a new theme. We generally have a maintenance issue and somebody has to care. I am so happy, that Csaba (and others) now renovate the current themes. If we add new ones, someone has to care for the old and new ones. And as anything must be touched to include scaling support, why not also renovate the look ?

Thank you, you guys rock ! Harald


emiliano added on 2023-08-23 00:13:54:
I don't get the ttk::entry change for the "alt" and "default" themes. ttk::entry should have the same border as ttk::combobox and ttk::spinbox, as these last two are specialized versions of the former.

OTOH, why not provide these changes as a new theme?

oehhar (claiming to be oehar) added on 2023-08-22 19:32:11:

That just looks great, thank you, Csaba.

Rdbene, as designer of great themes, maybe, you also have some ideas and contributions.

The stage is yours, folks !

I really appreciate ! Harald


rdbende added on 2023-08-22 17:18:48:
Wow, they new looks are indeed much nicer! Especially the "default" theme starts to look pretty sleek!

Now I wonder if the grey background colors could be changed to something lighter. This would make a big difference to the overall experience, in my opinion.

Attachments: