Import build of Tcl/Tk 8.6.9

This commit is contained in:
Steve Dower
2018-12-13 14:51:57 -08:00
parent 4ee57ea08c
commit 86027ce3ed
282 changed files with 14926 additions and 11642 deletions

View File

@@ -14,7 +14,7 @@
# tk::Priv elements used in this file:
#
# afterId - Token returned by "after" for autoscanning.
# listboxPrev - The last element to be selected or deselected
# listboxPrev - The last element to be selected or deselected
# during a selection operation.
# listboxSelection - All of the items that were selected before the
# current selection operation (such as a mouse

View File

@@ -609,7 +609,9 @@ proc ::tk::MenuButtonDown menu {
return
}
if {[$menu index active] eq "none"} {
set Priv(window) {}
if {[$menu cget -type] ne "menubar" } {
set Priv(window) {}
}
return
}
$menu postcascade active

View File

@@ -234,7 +234,8 @@ proc ::tk::MessageBox {args} {
}
if {!$valid} {
return -code error -errorcode {TK MSGBOX DEFAULT} \
"invalid default button \"$data(-default)\""
"bad -default value \"$data(-default)\": must be\
abort, retry, ignore, ok, cancel, no, or yes"
}
# 2. Set the dialog to be a child window of $parent

View File

@@ -205,27 +205,27 @@ proc ::tk::RecolorTree {w colors} {
#
# Arguments:
# color - Name of starting color.
# perecent - Integer telling how much to brighten or darken as a
# percent - Integer telling how much to brighten or darken as a
# percent: 50 means darken by 50%, 110 means brighten
# by 10%.
proc ::tk::Darken {color percent} {
foreach {red green blue} [winfo rgb . $color] {
set red [expr {($red/256)*$percent/100}]
set green [expr {($green/256)*$percent/100}]
set blue [expr {($blue/256)*$percent/100}]
break
if {$percent < 0} {
return #000000
} elseif {$percent > 200} {
return #ffffff
} elseif {$percent <= 100} {
lassign [winfo rgb . $color] r g b
set r [expr {($r/256)*$percent/100}]
set g [expr {($g/256)*$percent/100}]
set b [expr {($b/256)*$percent/100}]
} elseif {$percent > 100} {
lassign [winfo rgb . $color] r g b
set r [expr {255 - ((65535-$r)/256)*(200-$percent)/100}]
set g [expr {255 - ((65535-$g)/256)*(200-$percent)/100}]
set b [expr {255 - ((65535-$b)/256)*(200-$percent)/100}]
}
if {$red > 255} {
set red 255
}
if {$green > 255} {
set green 255
}
if {$blue > 255} {
set blue 255
}
return [format "#%02x%02x%02x" $red $green $blue]
return [format #%02x%02x%02x $r $g $b]
}
# ::tk_bisque --

View File

@@ -1,7 +1,7 @@
if {[catch {package present Tcl 8.6.0}]} { return }
if {($::tcl_platform(platform) eq "unix") && ([info exists ::env(DISPLAY)]
|| ([info exists ::argv] && ("-display" in $::argv)))} {
package ifneeded Tk 8.6.8 [list load [file join $dir .. .. bin libtk8.6.dll] Tk]
package ifneeded Tk 8.6.9 [list load [file join $dir .. .. bin libtk8.6.dll] Tk]
} else {
package ifneeded Tk 8.6.8 [list load [file join $dir .. .. bin tk86t.dll] Tk]
package ifneeded Tk 8.6.9 [list load [file join $dir .. .. bin tk86t.dll] Tk]
}

View File

@@ -1058,13 +1058,13 @@ proc ::tk_textCut w {
# make <<Cut>> an atomic operation on the Undo stack,
# i.e. separate it from other delete operations on either side
set oldSeparator [$w cget -autoseparators]
if {$oldSeparator} {
if {([$w cget -state] eq "normal") && $oldSeparator} {
$w edit separator
}
clipboard clear -displayof $w
clipboard append -displayof $w $data
$w delete sel.first sel.last
if {$oldSeparator} {
if {([$w cget -state] eq "normal") && $oldSeparator} {
$w edit separator
}
}

View File

@@ -11,7 +11,7 @@
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
# Verify that we have Tk binary and script components from the same release
package require -exact Tk 8.6.8
package require -exact Tk 8.6.9
# Create a ::tk namespace
namespace eval ::tk {

View File

@@ -95,8 +95,12 @@ namespace eval ttk::theme::alt {
ttk::style configure Heading -font TkHeadingFont -relief raised
ttk::style configure Treeview -background $colors(-window)
ttk::style map Treeview \
-background [list selected $colors(-selectbg)] \
-foreground [list selected $colors(-selectfg)] ;
-background [list disabled $colors(-frame)\
{!disabled !selected} $colors(-window) \
selected $colors(-selectbg)] \
-foreground [list disabled $colors(-disabledfg) \
{!disabled !selected} black \
selected $colors(-selectfg)]
ttk::style configure TScale \
-groovewidth 4 -troughrelief sunken \

View File

@@ -41,8 +41,13 @@ namespace eval ttk::theme::aqua {
ttk::style configure Heading -font TkHeadingFont
ttk::style configure Treeview -rowheight 18 -background White
ttk::style map Treeview \
-background {{selected background} systemHighlightSecondary
selected systemHighlight}
-background [list disabled systemDialogBackgroundInactive \
{!disabled !selected} systemWindowBody \
{selected background} systemHighlightSecondary \
selected systemHighlight] \
-foreground [list disabled systemModelessDialogInactiveText \
{!disabled !selected} black \
selected systemModelessDialogActiveText]
# Enable animation for ttk::progressbar widget:
ttk::style configure TProgressbar -period 100 -maxphase 255

View File

@@ -131,8 +131,12 @@ namespace eval ttk::theme::clam {
-font TkHeadingFont -relief raised -padding {3}
ttk::style configure Treeview -background $colors(-window)
ttk::style map Treeview \
-background [list selected $colors(-selectbg)] \
-foreground [list selected $colors(-selectfg)] ;
-background [list disabled $colors(-frame)\
{!disabled !selected} $colors(-window) \
selected $colors(-selectbg)] \
-foreground [list disabled $colors(-disabledfg) \
{!disabled !selected} black \
selected $colors(-selectfg)]
ttk::style configure TLabelframe \
-labeloutside true -labelmargins {0 0 0 4} \

View File

@@ -98,8 +98,12 @@ namespace eval ttk::theme::classic {
ttk::style configure Heading -font TkHeadingFont -relief raised
ttk::style configure Treeview -background $colors(-window)
ttk::style map Treeview \
-background [list selected $colors(-selectbg)] \
-foreground [list selected $colors(-selectfg)] ;
-background [list disabled $colors(-frame)\
{!disabled !selected} $colors(-window) \
selected $colors(-selectbg)] \
-foreground [list disabled $colors(-disabledfg) \
{!disabled !selected} black \
selected $colors(-selectfg)]
#
# Toolbar buttons:

View File

@@ -88,18 +88,18 @@ bind ComboboxPopdown <ButtonPress> \
### Option database settings.
#
option add *TCombobox*Listbox.font TkTextFont
option add *TCombobox*Listbox.relief flat
option add *TCombobox*Listbox.highlightThickness 0
option add *TCombobox*Listbox.font TkTextFont widgetDefault
option add *TCombobox*Listbox.relief flat widgetDefault
option add *TCombobox*Listbox.highlightThickness 0 widgetDefault
## Platform-specific settings.
#
switch -- [tk windowingsystem] {
x11 {
option add *TCombobox*Listbox.background white
option add *TCombobox*Listbox.background white widgetDefault
}
aqua {
option add *TCombobox*Listbox.borderWidth 0
option add *TCombobox*Listbox.borderWidth 0 widgetDefault
}
}

View File

@@ -110,8 +110,12 @@ namespace eval ttk::theme::default {
-background $colors(-window) \
-foreground $colors(-text) ;
ttk::style map Treeview \
-background [list selected $colors(-selectbg)] \
-foreground [list selected $colors(-selectfg)] ;
-background [list disabled $colors(-frame)\
{!disabled !selected} $colors(-window) \
selected $colors(-selectbg)] \
-foreground [list disabled $colors(-disabledfg) \
{!disabled !selected} black \
selected $colors(-selectfg)]
# Combobox popdown frame
ttk::style layout ComboboxPopdownFrame {

View File

@@ -34,7 +34,7 @@ namespace eval ttk {
### Option database settings.
#
option add *TEntry.cursor [ttk::cursor text]
option add *TEntry.cursor [ttk::cursor text] widgetDefault
### Bindings.
#
@@ -418,7 +418,7 @@ proc ttk::entry::DragOut {w mode} {
# Suspend autoscroll.
#
proc ttk::entry::DragIn {w} {
ttk::CancelRepeat
ttk::CancelRepeat
}
## <ButtonRelease-1> binding
@@ -432,7 +432,7 @@ proc ttk::entry::Release {w} {
## AutoScroll
# Called repeatedly when the mouse is outside an entry window
# with Button 1 down. Scroll the window left or right,
# depending on where the mouse left the window, and extend
# depending on where the mouse left the window, and extend
# the selection according to the current selection mode.
#
# TODO: AutoScroll should repeat faster (50ms) than normal autorepeat.

View File

@@ -9,7 +9,7 @@
switch -- [tk windowingsystem] {
x11 -
win32 {
option add *TSizegrip.cursor [ttk::cursor seresize]
option add *TSizegrip.cursor [ttk::cursor seresize] widgetDefault
}
aqua {
# Aqua sizegrips use default Arrow cursor.

View File

@@ -120,7 +120,7 @@ proc ttk::treeview::ActivateHeading {w heading} {
variable State
if {$w != $State(activeWidget) || $heading != $State(activeHeading)} {
if {$State(activeHeading) != {}} {
if {[winfo exists $State(activeWidget)] && $State(activeHeading) != {}} {
$State(activeWidget) heading $State(activeHeading) state !active
}
if {$heading != {}} {

View File

@@ -21,6 +21,7 @@ namespace eval ttk::theme::vista {
-foreground SystemWindowText \
-selectforeground SystemHighlightText \
-selectbackground SystemHighlight \
-insertcolor SystemWindowText \
-font TkDefaultFont \
;
@@ -46,20 +47,24 @@ namespace eval ttk::theme::vista {
ttk::style configure Heading -font TkHeadingFont
ttk::style configure Treeview -background SystemWindow
ttk::style map Treeview \
-background [list selected SystemHighlight] \
-foreground [list selected SystemHighlightText] ;
-background [list disabled SystemButtonFace \
{!disabled !selected} SystemWindow \
selected SystemHighlight] \
-foreground [list disabled SystemGrayText \
{!disabled !selected} SystemWindowText \
selected SystemHighlightText]
# Label and Toolbutton
ttk::style configure TLabelframe.Label -foreground "#0046d5"
ttk::style configure TLabelframe.Label -foreground SystemButtonText
ttk::style configure Toolbutton -padding {4 4}
# Combobox
ttk::style configure TCombobox -padding 2
ttk::style element create Combobox.field vsapi \
COMBOBOX 2 {{} 1}
ttk::style element create Combobox.border vsapi \
COMBOBOX 4 {disabled 4 focus 3 active 2 hover 2 {} 1}
ttk::style element create Combobox.background vsapi \
EDIT 3 {disabled 3 readonly 5 focus 4 hover 2 {} 1}
ttk::style element create Combobox.rightdownarrow vsapi \
COMBOBOX 6 {disabled 4 pressed 3 active 2 {} 1} \
-syssize {SM_CXVSCROLL SM_CYVSCROLL}
@@ -67,8 +72,10 @@ namespace eval ttk::theme::vista {
Combobox.border -sticky nswe -border 0 -children {
Combobox.rightdownarrow -side right -sticky ns
Combobox.padding -expand 1 -sticky nswe -children {
Combobox.focus -expand 1 -sticky nswe -children {
Combobox.textarea -sticky nswe
Combobox.background -sticky nswe -children {
Combobox.focus -expand 1 -sticky nswe -children {
Combobox.textarea -sticky nswe
}
}
}
}

View File

@@ -10,6 +10,8 @@ namespace eval ttk::theme::winnative {
-foreground SystemWindowText \
-selectforeground SystemHighlightText \
-selectbackground SystemHighlight \
-fieldbackground SystemWindow \
-insertcolor SystemWindowText \
-troughcolor SystemScrollbar \
-font TkDefaultFont \
;
@@ -71,8 +73,12 @@ namespace eval ttk::theme::winnative {
ttk::style configure Heading -font TkHeadingFont -relief raised
ttk::style configure Treeview -background SystemWindow
ttk::style map Treeview \
-background [list selected SystemHighlight] \
-foreground [list selected SystemHighlightText] ;
-background [list disabled SystemButtonFace \
{!disabled !selected} SystemWindow \
selected SystemHighlight] \
-foreground [list disabled SystemGrayText \
{!disabled !selected} SystemWindowText \
selected SystemHighlightText]
ttk::style configure TProgressbar \
-background SystemHighlight -borderwidth 0 ;

View File

@@ -11,6 +11,7 @@ namespace eval ttk::theme::xpnative {
-foreground SystemWindowText \
-selectforeground SystemHighlightText \
-selectbackground SystemHighlight \
-insertcolor SystemWindowText \
-font TkDefaultFont \
;
@@ -61,5 +62,15 @@ namespace eval ttk::theme::xpnative {
ttk::style configure Toolbutton -padding {4 4}
# Treeview:
ttk::style configure Heading -font TkHeadingFont -relief raised
ttk::style configure Treeview -background SystemWindow
ttk::style map Treeview \
-background [list disabled SystemButtonFace \
{!disabled !selected} SystemWindow \
selected SystemHighlight] \
-foreground [list disabled SystemGrayText \
{!disabled !selected} SystemWindowText \
selected SystemHighlightText];
}
}