Import build of Tcl/Tk 8.6.10

This commit is contained in:
Steve Dower
2020-09-24 23:32:28 +01:00
parent 86027ce3ed
commit c0c00d5551
498 changed files with 65344 additions and 64042 deletions

View File

@@ -19,8 +19,13 @@ package require Tk
proc rulerMkTab {c x y} {
upvar #0 demo_rulerInfo v
$c create polygon $x $y [expr {$x+$v(size)}] [expr {$y+$v(size)}] \
[expr {$x-$v(size)}] [expr {$y+$v(size)}]
set newTab [$c create polygon $x $y \
[expr {$x+$v(size)}] [expr {$y+$v(size)}] \
[expr {$x-$v(size)}] [expr {$y+$v(size)}]]
set fill [$c itemcget $newTab -outline]
$c itemconfigure $newTab -fill $fill -outline {}
set v(normalStyle) "-fill $fill"
return $newTab
}
set w .ruler
@@ -47,7 +52,6 @@ set demo_rulerInfo(right) [winfo fpixels $c 13c]
set demo_rulerInfo(top) [winfo fpixels $c 1c]
set demo_rulerInfo(bottom) [winfo fpixels $c 1.5c]
set demo_rulerInfo(size) [winfo fpixels $c .2c]
set demo_rulerInfo(normalStyle) "-fill black"
# Main widget program sets variable tk_demoDirectory
if {[winfo depth $c] > 1} {
set demo_rulerInfo(activeStyle) "-fill red -stipple {}"
@@ -69,7 +73,7 @@ for {set i 0} {$i < 12} {incr i} {
$c create text $x.15c .75c -text $i -anchor sw
}
$c addtag well withtag [$c create rect 13.2c 1c 13.8c 0.5c \
-outline black -fill [lindex [$c config -bg] 4]]
-fill [lindex [$c config -bg] 4]]
$c addtag well withtag [rulerMkTab $c [winfo pixels $c 13.5c] \
[winfo pixels $c .65c]]