Current Version: 6.0 (2019-11-23)
Available at: https://sourceforge.net/projects/tcl-awthemes/
bll 2019-11-23: Version 6.0 adds the scalable winxpblue theme.
bll 2019-11-19: Version 5.0 features an additional scaling setting for use by the application, and the ability to create a scaled style, giving different graphics sizes for the same theme using the new style.
bll 2019-10-4: With version 4.0, support for other themes has been added. A scalable 'black' theme has been implemented.
bll 2019-10-7: With version 3.0, if tksvg is present, the graphics will scale according to the tk scaling setting.
bll 2018-9-1: Just thought I would try and create a new theme. Loosely based on adwaita dark. I have learned more about ttk themeing, found issues in my application code related to colors and themes. Uses graphics for the checkbuttons and radiobuttons. The notebook tab top color is created dynamically. Everything else is based on the clam theme.
See also: awlight ttk theme
On Mac OS X for versions prior to 8.6.10, to override the aqua styled scrollbars, use:
ttk::scrollbar .sb -style Vertical.TScrollbar ttk::scrollbar .sb -style Horizontal.TScrollbar
The -style option must be present when the scrollbar is created, an aqua scrollbar cannot be reconfigured.
Application ScalingIn order to match the theme graphics size to the font size, the application can:
tk scaling 1.3888 ; # set the tk scaling appropriate to the user's computer set sz1 [font metrics TkDefaultFont -ascent] ; # the default font size for Tk set sz2 [font metrics appfont -ascent] ; # the application font default size set scale [expr {double(sz2)/double(sz1)}] ; # calculate the scaling ratio ::themeutils::setThemeColors awdark \ scale.factor $scale package require awdark
New: scaled styles: Same theme, different styles, different graphics sizes:
A new style with appropriately sized graphics can be created. For example, the application may have a base application font size used everywhere, and an alternate sized font for data listings. The application can then:
package require awdark if { [info commands ::ttk::theme::[ttk::style theme use]::scaledStyle] ne {} } { ::ttk::theme::[ttk::style theme use]::scaledStyle Listing mainfont listingfont }
Then the data listings are created using Listing.TCheckbutton, Listing.TCombobox, etc. which match the font size specified. All of the Listing.* widgets have re-configured graphics sizes to match the specified font.
6.0 (2019-11-23)
5.1
5.0
4.2.1
4.2
4.1
4.0
3.1
3.0
2.6
2.5
2.4
2.3
2.2:
2.1:
2.0:
1.4: change button anchor to default to center to follow majority of themes
1.3: clean up images a little
1.2: fix button press color
1.1: per request, remove the leading :: from the package name.
1.0: More fixes for Mac OS X.
0.9: Fixes for Mac OS X.
0.8: Set disabled field background color for entry, spinbox, combobox. Set disabled border color.
0.7: Fixed listbox helper routine. Added option for dark background for the text helper routine
0.6: Fixed hover highlight on notebook tabs.
::ttk::theme::awdark::setMenuColors .menuwidget
Sets the menu colors and also changes any checkbutton and radiobutton types to use thematic images. Run this after adding all the menu items to the menu.
Side effect: The menu will have -hidemargin set to true.
If you don't want the thematic images, run it before adding your menu items (and set -hidemargin back to false).
::ttk::theme::awdark::setTextColors .textwidget ?-dark?
Sets the text widget colors. If -dark is specified, the darker background color (as for entry) will be used.
::ttk::theme::awdark::setListboxColors .listboxwidget
Sets the listbox widget colors.
::ttk::theme::awdark::setBackground color
Changes the background color and all other colors to match. (like tk_setPalette). This will also call setTextColors, setListboxColors and setMenuColors on all registered widgets.
::ttk::theme::awdark::setHighlight color
Changes the highlight color.
After ::ttk::theme::[ttk::style theme use]::setBackground #253b20
After ::ttk::theme::[ttk::style theme use]::setHighlight #3fff47. Note that the radiobuttons are graphical, and do not change colors.
Jeff Smith 2019-07-04 : Below is an online demo using CloudTk
See also: List of ttk Themes