diff options
Diffstat (limited to 'library/demos/windowicons.tcl')
-rw-r--r-- | library/demos/windowicons.tcl | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/library/demos/windowicons.tcl b/library/demos/windowicons.tcl index 25c8308..0c1e0c0 100644 --- a/library/demos/windowicons.tcl +++ b/library/demos/windowicons.tcl @@ -92,19 +92,17 @@ image create photo icon -data { set ::tk::icons::base_icon(.) icon -# -# Create a copy of the image just created, magnified according -# to the display's DPI scaling level. Note that the copy will -# only be effectively magnified if $tk::scalingPct >= 200. -# +# Create a copy of the image just created, magnified according to the +# display's DPI scaling level. Since the zooom factor must be an integer, +# the copy will only be effectively magnified if $tk::scalingPct >= 200. image create photo icon2 icon2 copy icon -zoom [expr {$tk::scalingPct / 100}] pack [button $w.i -text "Set Window Icon to Globe" -image icon2 \ - -compound top -command {wm iconphoto . icon}] -fill x -padx 4 + -compound top -command {wm iconphoto . icon}] -fill x -padx 3p pack [button $w.b -text "Set Badge to 3" -command {wm iconbadge . 3}] \ - -fill x -padx 4 + -fill x -padx 3p pack [button $w.e -text "Set Badge to 11" -command {wm iconbadge . 11}] \ - -fill x -padx 4 + -fill x -padx 3p pack [button $w.f -text "Reset Badge" -command {wm iconbadge . ""}] \ - -fill x -padx 4 + -fill x -padx 3p |