Imported Tk 8.6.9

This commit is contained in:
Steve Dower
2018-12-11 10:05:28 -08:00
parent 753ac6b037
commit 5ba5cbc9af
184 changed files with 6223 additions and 1994 deletions

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];
}
}