summaryrefslogtreecommitdiffstats
path: root/library/ttk
diff options
context:
space:
mode:
Diffstat (limited to 'library/ttk')
-rw-r--r--library/ttk/aquaTheme.tcl6
-rw-r--r--library/ttk/menubutton.tcl16
-rw-r--r--library/ttk/scrollbar.tcl2
3 files changed, 13 insertions, 11 deletions
diff --git a/library/ttk/aquaTheme.tcl b/library/ttk/aquaTheme.tcl
index 3ccdd70..876423f 100644
--- a/library/ttk/aquaTheme.tcl
+++ b/library/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/library/ttk/menubutton.tcl b/library/ttk/menubutton.tcl
index a245df8..a0f70c9 100644
--- a/library/ttk/menubutton.tcl
+++ b/library/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/library/ttk/scrollbar.tcl b/library/ttk/scrollbar.tcl
index 1213450..8be9887 100644
--- a/library/ttk/scrollbar.tcl
+++ b/library/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 {