summaryrefslogtreecommitdiff
path: root/systems/texlive/tlnet/tlpkg/tltcl/lib/tk8.6/ttk
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-04-04 03:14:42 +0000
committerNorbert Preining <norbert@preining.info>2022-04-04 03:14:42 +0000
commit7548e4d37c2aaefd32fe0a9bcd83f8e71326dde1 (patch)
treed335b608e63e9b3c37d7ba0e567c63e77250e171 /systems/texlive/tlnet/tlpkg/tltcl/lib/tk8.6/ttk
parent506de1e2d3515161cdbc7018b4ccc9e49d7f86e8 (diff)
CTAN sync 202204040314
Diffstat (limited to 'systems/texlive/tlnet/tlpkg/tltcl/lib/tk8.6/ttk')
-rw-r--r--systems/texlive/tlnet/tlpkg/tltcl/lib/tk8.6/ttk/aquaTheme.tcl6
-rw-r--r--systems/texlive/tlnet/tlpkg/tltcl/lib/tk8.6/ttk/menubutton.tcl16
-rw-r--r--systems/texlive/tlnet/tlpkg/tltcl/lib/tk8.6/ttk/notebook.tcl12
-rw-r--r--systems/texlive/tlnet/tlpkg/tltcl/lib/tk8.6/ttk/scrollbar.tcl2
-rw-r--r--systems/texlive/tlnet/tlpkg/tltcl/lib/tk8.6/ttk/utils.tcl21
5 files changed, 28 insertions, 29 deletions
diff --git a/systems/texlive/tlnet/tlpkg/tltcl/lib/tk8.6/ttk/aquaTheme.tcl b/systems/texlive/tlnet/tlpkg/tltcl/lib/tk8.6/ttk/aquaTheme.tcl
index 3ccdd70d79..876423ff1f 100644
--- a/systems/texlive/tlnet/tlpkg/tltcl/lib/tk8.6/ttk/aquaTheme.tcl
+++ b/systems/texlive/tlnet/tlpkg/tltcl/lib/tk8.6/ttk/aquaTheme.tcl
@@ -42,6 +42,9 @@ namespace eval ttk::theme::aqua {
# so we only need to specify !focus.)
# Entry
+ ttk::style configure TEntry \
+ -foreground systemTextColor \
+ -background systemTextBackgroundColor
ttk::style map TEntry \
-foreground {
disabled systemDisabledControlTextColor
@@ -60,6 +63,9 @@ namespace eval ttk::theme::aqua {
}
# Spinbox
+ ttk::style configure TSpinbox \
+ -foreground systemTextColor \
+ -background systemTextBackgroundColor
ttk::style map TSpinbox \
-foreground {
disabled systemDisabledControlTextColor
diff --git a/systems/texlive/tlnet/tlpkg/tltcl/lib/tk8.6/ttk/menubutton.tcl b/systems/texlive/tlnet/tlpkg/tltcl/lib/tk8.6/ttk/menubutton.tcl
index a245df81ba..a0f70c99d0 100644
--- a/systems/texlive/tlnet/tlpkg/tltcl/lib/tk8.6/ttk/menubutton.tcl
+++ b/systems/texlive/tlnet/tlpkg/tltcl/lib/tk8.6/ttk/menubutton.tcl
@@ -83,9 +83,8 @@ if {[tk windowingsystem] eq "aqua"} {
set mw [winfo reqwidth $menu]
set bw [winfo width $mb]
set dF [expr {[winfo width $mb] - [winfo reqwidth $menu] - $menuPad}]
- set entry ""
set entry [::tk::MenuFindName $menu [$mb cget -text]]
- if {$entry eq ""} {
+ if {$entry < 0} {
set entry 0
}
set x [winfo rootx $mb]
@@ -124,25 +123,24 @@ if {[tk windowingsystem] eq "aqua"} {
incr mh 6
incr mw 16
}
- set entry {}
set entry [::tk::MenuFindName $menu [$mb cget -text]]
- if {$entry eq {}} {
+ if {$entry < 0} {
set entry 0
}
set x [winfo rootx $mb]
set y [winfo rooty $mb]
switch [$mb cget -direction] {
above {
- set entry {}
+ set entry ""
incr y -$mh
# if we go offscreen to the top, show as 'below'
if {$y < [winfo vrooty $mb]} {
set y [expr {[winfo vrooty $mb] + [winfo rooty $mb]\
- + [winfo reqheight $mb]}]
+ + [winfo reqheight $mb]}]
}
}
below {
- set entry {}
+ set entry ""
incr y $bh
# if we go offscreen to the bottom, show as 'above'
if {($y + $mh) > ([winfo vrooty $mb] + [winfo vrootheight $mb])} {
@@ -196,7 +194,7 @@ proc ttk::menubutton::Pulldown {mb} {
$mb state pressed
$mb configure -cursor [$menu cget -cursor]
foreach {x y entry} [PostPosition $mb $menu] { break }
- if {$entry ne {}} {
+ if {$entry >= 0} {
$menu post $x $y $entry
} else {
$menu post $x $y
@@ -228,7 +226,7 @@ proc ttk::menubutton::TransferGrab {mb} {
#
proc ttk::menubutton::FindMenuEntry {menu s} {
set last [$menu index last]
- if {$last eq "none" || $last eq ""} {
+ if {$last eq "none" || $last < 0} {
return ""
}
for {set i 0} {$i <= $last} {incr i} {
diff --git a/systems/texlive/tlnet/tlpkg/tltcl/lib/tk8.6/ttk/notebook.tcl b/systems/texlive/tlnet/tlpkg/tltcl/lib/tk8.6/ttk/notebook.tcl
index c5340a5cdd..518c6f53d5 100644
--- a/systems/texlive/tlnet/tlpkg/tltcl/lib/tk8.6/ttk/notebook.tcl
+++ b/systems/texlive/tlnet/tlpkg/tltcl/lib/tk8.6/ttk/notebook.tcl
@@ -57,11 +57,13 @@ proc ttk::notebook::Press {w x y} {
# Select the next/previous tab in the list.
#
proc ttk::notebook::CycleTab {w dir} {
- if {[$w index end] != 0} {
- set current [$w index current]
- set select [expr {($current + $dir) % [$w index end]}]
- while {[$w tab $select -state] != "normal" && ($select != $current)} {
- set select [expr {($select + $dir) % [$w index end]}]
+ set current [$w index current]
+ if {$current >= 0} {
+ set tabCount [$w index end]
+ set select [expr {($current + $dir) % $tabCount}]
+ set step [expr {$dir > 0 ? 1 : -1}]
+ while {[$w tab $select -state] ne "normal" && ($select != $current)} {
+ set select [expr {($select + $step) % $tabCount}]
}
if {$select != $current} {
ActivateTab $w $select
diff --git a/systems/texlive/tlnet/tlpkg/tltcl/lib/tk8.6/ttk/scrollbar.tcl b/systems/texlive/tlnet/tlpkg/tltcl/lib/tk8.6/ttk/scrollbar.tcl
index 1213450743..8be9887de7 100644
--- a/systems/texlive/tlnet/tlpkg/tltcl/lib/tk8.6/ttk/scrollbar.tcl
+++ b/systems/texlive/tlnet/tlpkg/tltcl/lib/tk8.6/ttk/scrollbar.tcl
@@ -29,8 +29,6 @@ switch [tk windowingsystem] {
x11 {
lappend eventList <Button-4> <Button-5> \
<Shift-Button-4> <Shift-Button-5>
- # For tk 8.7, the event list will be extended by
- # <Button-6> <Button-7>
}
}
foreach event $eventList {
diff --git a/systems/texlive/tlnet/tlpkg/tltcl/lib/tk8.6/ttk/utils.tcl b/systems/texlive/tlnet/tlpkg/tltcl/lib/tk8.6/ttk/utils.tcl
index f6a6c9eac8..257191493e 100644
--- a/systems/texlive/tlnet/tlpkg/tltcl/lib/tk8.6/ttk/utils.tcl
+++ b/systems/texlive/tlnet/tlpkg/tltcl/lib/tk8.6/ttk/utils.tcl
@@ -303,19 +303,14 @@ proc ttk::bindMouseWheel {bindtag callback} {
}
if {[tk windowingsystem] eq "aqua"} {
bind $bindtag <MouseWheel> "$callback \[expr {-%D}\]"
- bind $bindtag <Option-MouseWheel> "$callback \[expr {-10*%D}\]"
+ bind $bindtag <Option-MouseWheel> "$callback \[expr {-10 * %D}\]"
} else {
- bind $bindtag <MouseWheel> "$callback \[expr {-%D/120)}\]"
+ bind $bindtag <MouseWheel> "$callback \[expr {-%D / 120}\]"
}
}
## Mousewheel bindings for standard scrollable widgets.
#
-# Usage: [ttk::copyBindings TtkScrollable $bindtag]
-#
-# $bindtag should be for a widget that supports the
-# standard scrollbar protocol.
-#
if {[tk windowingsystem] eq "x11"} {
bind TtkScrollable <Button-4> { %W yview scroll -5 units }
@@ -325,18 +320,18 @@ if {[tk windowingsystem] eq "x11"} {
}
if {[tk windowingsystem] eq "aqua"} {
bind TtkScrollable <MouseWheel> \
- { %W yview scroll [expr {-(%D)}] units }
+ { %W yview scroll [expr {-%D}] units }
bind TtkScrollable <Shift-MouseWheel> \
- { %W xview scroll [expr {-(%D)}] units }
+ { %W xview scroll [expr {-%D}] units }
bind TtkScrollable <Option-MouseWheel> \
- { %W yview scroll [expr {-10 * (%D)}] units }
+ { %W yview scroll [expr {-10 * %D}] units }
bind TtkScrollable <Shift-Option-MouseWheel> \
- { %W xview scroll [expr {-10 * (%D)}] units }
+ { %W xview scroll [expr {-10 * %D}] units }
} else {
bind TtkScrollable <MouseWheel> \
- { %W yview scroll [expr {-(%D / 120)}] units }
+ { %W yview scroll [expr {-%D / 120}] units }
bind TtkScrollable <Shift-MouseWheel> \
- { %W xview scroll [expr {-(%D / 120)}] units }
+ { %W xview scroll [expr {-%D / 120}] units }
}
#*EOF*