awdark ttk theme edit
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.- Focus box around notebook tabs is larger.
- Focus box for checkbuttons and radiobuttons covers both the indicator and the text.
- Includes helper routines to set the colors for menu, listbox and text.
ttk::scrollbar .sb -style Vertical.TScrollbar ttk::scrollbar .sb -style Horizontal.TScrollbarThe -style option must be present when the scrollbar is created, an aqua scrollbar cannot be reconfigured.See also: awlight ttk themeCurrent Version: 2.2 ChangeLog
2.2:
- Added support for flexmenu.
- Fixed listbox frame.
- Added Menu.TCheckbutton and Menu.TRadiobutton styles to support menu creation.
- Add setBackground(), setHighlight() routines. If wanted, these require the colorutils package.
- Remove the 'option add' statements and use a bind to set the combobox's listbox colors.
- Merge awdark and awlight themes into a single package.
- More color cleanup.
- Make notebook top bar use dynamic colors.
::ttk::theme::awdark::setMenuColors .menuwidgetSets 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 .listboxwidgetSets the listbox widget colors.::ttk::theme::awdark::setBackground colorChanges 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 colorChanges the highlight color.
For the moment, available at: https://gentoo.com/tcl/awthemes.tcl colorutils package for use with setBackground and setHighlight: https://gentoo.com/tcl/colorutils.tclThe demo code to display the widgets is: https://gentoo.com/tcl/demottk.tcl
Please post comments in the comp.lang.tcl thread (active 2018-9-1): https://groups.google.com/d/topic/comp.lang.tcl/fkwlov3x2cA/discussionAfter ::ttk::theme::[ttk::style theme use]::setBackground #253b20After ::ttk::theme::[ttk::style theme use]::setHighlight #3fff47. Note that the radiobuttons are graphical, and do not change colors.
See also: List of ttk Themes