Version 5 of Scaled checkbutton

Updated 2016-05-13 06:49:31 by bll

checkButtonScaled

bll 2016-05-10: The standard ttk::checkbutton does not scale well for 4K displays. This code is a pure tcl implementation of checkbuttons with no graphics. It includes styling for all 22 themes. I have attempted to match each theme's styling reasonably well. The package will change themes on a <<ThemeChanged>> event.

Place the package require in your code after tk scaling has been set.

Download from:

    http://gentoo.com/tcl/checkButtonScaled.tcl%|%http://gentoo.com/tcl/checkButtonScaled.tcl%|%

Version 1.7 2016-5-11

  • Fixed scaling.
  • Improved size of indicator character.

Version 1.6 2016-5-10

  • Added propagateBinds routine
  • Handle -style option -- loads styling from the ttk::style
  • Was missing -font
  • Fixed a bug for configure -variable

Discussion

dbohdan 2016-05-12: The fact that you have a styling for each of the 22 themes is impressive.

Could you put a high-DPI screenshot of the widget on this page?

bll 2016-5-12: Well, I actually don't have a 4K screen to test with. But I can set a windows VM to 3840x2160 video mode. Which I can then view in VirtualBox's scaled mode (it's quite horrible). The image below was made with Window's snipping tool inside the VM with tk scaling set to 2.67 (192 dpi). Windows mentioned 192 dpi when I set the custom text size to 200%, so I used that number. On the left is a standard ttk::checkbutton, on the right is the scaled checkbutton.


Scaled-checkbutton-image