summaryrefslogtreecommitdiffstats
path: root/library/ttk
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-08-21 15:39:37 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-08-21 15:39:37 (GMT)
commit4599696086a1c8e7cd453f1ffbce0f95dbfd283f (patch)
tree2189fbef8bf2392aaffc9cce4021eb5bf11c7911 /library/ttk
parent6560e31a6006a2aec8c95564ec8287088c2e11de (diff)
parent8962bfa23f42567fd3e6ead0c1f2326b3472ca19 (diff)
downloadtk-4599696086a1c8e7cd453f1ffbce0f95dbfd283f.zip
tk-4599696086a1c8e7cd453f1ffbce0f95dbfd283f.tar.gz
tk-4599696086a1c8e7cd453f1ffbce0f95dbfd283f.tar.bz2
Fix [291699a5]: ttk::scrollbar : graphical grip does not have mouse bindings.
Also remove some eol-spacing.
Diffstat (limited to 'library/ttk')
-rw-r--r--library/ttk/aquaTheme.tcl6
-rw-r--r--library/ttk/button.tcl2
-rw-r--r--library/ttk/clamTheme.tcl2
-rw-r--r--library/ttk/defaults.tcl2
-rw-r--r--library/ttk/menubutton.tcl14
-rw-r--r--library/ttk/notebook.tcl10
-rw-r--r--library/ttk/scrollbar.tcl4
-rw-r--r--library/ttk/treeview.tcl4
-rw-r--r--library/ttk/ttk.tcl2
-rw-r--r--library/ttk/vistaTheme.tcl10
10 files changed, 29 insertions, 27 deletions
diff --git a/library/ttk/aquaTheme.tcl b/library/ttk/aquaTheme.tcl
index e8009be..8bba226 100644
--- a/library/ttk/aquaTheme.tcl
+++ b/library/ttk/aquaTheme.tcl
@@ -15,7 +15,7 @@ namespace eval ttk::theme::aqua {
-insertwidth 1
ttk::style map . \
- -foreground {
+ -foreground {
disabled systemDisabledControlTextColor
background systemLabelColor} \
-selectbackground {
@@ -49,7 +49,7 @@ namespace eval ttk::theme::aqua {
-selectbackground {
background systemTextBackgroundColor
}
-
+
# Workaround for #1100117:
# Actually, on Aqua we probably shouldn't stipple images in
@@ -100,7 +100,7 @@ namespace eval ttk::theme::aqua {
!focus systemTextBackgroundColor
focus systemSelectedTextBackgroundColor
}
-
+
# Treeview:
ttk::style configure Heading \
-font TkHeadingFont \
diff --git a/library/ttk/button.tcl b/library/ttk/button.tcl
index 9f2cec7..24065c2 100644
--- a/library/ttk/button.tcl
+++ b/library/ttk/button.tcl
@@ -8,7 +8,7 @@
# (If the button is released off the widget, the grab deactivates and
# we get a <Leave> event then, which turns off the "active" state)
#
-# Normally, <ButtonRelease> and <ButtonN-Enter/Leave> events are
+# Normally, <ButtonRelease> and <ButtonN-Enter/Leave> events are
# delivered to the widget which received the initial <ButtonPress>
# event. However, Tk [grab]s (#1223103) and menu interactions
# (#1222605) can interfere with this. To guard against spurious
diff --git a/library/ttk/clamTheme.tcl b/library/ttk/clamTheme.tcl
index 6935fc7..bfcb194 100644
--- a/library/ttk/clamTheme.tcl
+++ b/library/ttk/clamTheme.tcl
@@ -5,7 +5,7 @@
#
namespace eval ttk::theme::clam {
- variable colors
+ variable colors
array set colors {
-disabledfg "#999999"
-frame "#dcdad5"
diff --git a/library/ttk/defaults.tcl b/library/ttk/defaults.tcl
index a15d1d9..2db9a37 100644
--- a/library/ttk/defaults.tcl
+++ b/library/ttk/defaults.tcl
@@ -43,7 +43,7 @@ namespace eval ttk::theme::default {
ttk::style configure TButton \
-anchor center -padding "3 3" -width -9 \
-relief raised -shiftrelief 1
- ttk::style map TButton -relief [list {!disabled pressed} sunken]
+ ttk::style map TButton -relief [list {!disabled pressed} sunken]
ttk::style configure TCheckbutton \
-indicatorcolor "#ffffff" -indicatorrelief sunken -padding 1
diff --git a/library/ttk/menubutton.tcl b/library/ttk/menubutton.tcl
index 43b3cd8..bb947c2 100644
--- a/library/ttk/menubutton.tcl
+++ b/library/ttk/menubutton.tcl
@@ -10,7 +10,7 @@
# (In addition, when menu system is active, "dropdown" -- menu posts
# on mouse-over. Ttk menubuttons don't implement this).
#
-# For keyboard and popdown mode, we hand off to tk_popup and let
+# For keyboard and popdown mode, we hand off to tk_popup and let
# the built-in Tk bindings handle the rest of the interaction.
#
# ON X11:
@@ -22,13 +22,13 @@
# rely on the passive grab that occurs on <ButtonPress> events,
# and transition to popdown mode when the mouse is released
# or dragged outside the menubutton.
-#
+#
# ON WINDOWS:
#
-# I'm not sure what the hell is going on here. [$menu post] apparently
+# I'm not sure what the hell is going on here. [$menu post] apparently
# sets up some kind of internal grab for native menus.
# On this platform, just use [tk_popup] for all menu actions.
-#
+#
# ON MACOS:
#
# Same probably applies here.
@@ -97,7 +97,7 @@ if {[tk windowingsystem] eq "aqua"} {
}
below {
set entry ""
- incr y $bh
+ incr y $bh
}
left {
incr y $menuPad
@@ -105,7 +105,7 @@ if {[tk windowingsystem] eq "aqua"} {
}
right {
incr y $menuPad
- incr x $bw
+ incr x $bw
}
default {
incr y $bbh
@@ -182,7 +182,7 @@ proc ttk::menubutton::Popdown {mb} {
# Pulldown (X11 only) --
# Called when Button1 is pressed on a menubutton.
-# Posts the menu; a subsequent ButtonRelease
+# Posts the menu; a subsequent ButtonRelease
# or Leave event will set a grab on the menu.
#
proc ttk::menubutton::Pulldown {mb} {
diff --git a/library/ttk/notebook.tcl b/library/ttk/notebook.tcl
index 72b85e6..92efe40 100644
--- a/library/ttk/notebook.tcl
+++ b/library/ttk/notebook.tcl
@@ -70,7 +70,7 @@ proc ttk::notebook::CycleTab {w dir} {
}
# MnemonicTab $nb $key --
-# Scan all tabs in the specified notebook for one with the
+# Scan all tabs in the specified notebook for one with the
# specified mnemonic. If found, returns path name of tab;
# otherwise returns ""
#
@@ -94,8 +94,8 @@ proc ttk::notebook::MnemonicTab {nb key} {
# Enable keyboard traversal for a notebook widget
# by adding bindings to the containing toplevel window.
#
-# TLNotebooks($top) keeps track of the list of all traversal-enabled
-# notebooks contained in the toplevel
+# TLNotebooks($top) keeps track of the list of all traversal-enabled
+# notebooks contained in the toplevel
#
proc ttk::notebook::enableTraversal {nb} {
variable TLNotebooks
@@ -145,7 +145,7 @@ proc ttk::notebook::Cleanup {nb} {
}
}
-# EnclosingNotebook $w --
+# EnclosingNotebook $w --
# Return the nearest traversal-enabled notebook widget
# that contains $w.
#
@@ -171,7 +171,7 @@ proc ttk::notebook::EnclosingNotebook {w} {
# TLCycleTab --
# toplevel binding procedure for Control-Tab / Control-Shift-Tab
-# Select the next/previous tab in the nearest ancestor notebook.
+# Select the next/previous tab in the nearest ancestor notebook.
#
proc ttk::notebook::TLCycleTab {w dir} {
set nb [EnclosingNotebook $w]
diff --git a/library/ttk/scrollbar.tcl b/library/ttk/scrollbar.tcl
index efcf3a1..e939426 100644
--- a/library/ttk/scrollbar.tcl
+++ b/library/ttk/scrollbar.tcl
@@ -67,6 +67,7 @@ proc ttk::scrollbar::Press {w x y} {
*rightarrow {
ttk::Repeatedly Scroll $w 1 units
}
+ *grip -
*thumb {
set State(first) [lindex [$w get] 0]
}
@@ -89,7 +90,7 @@ proc ttk::scrollbar::Press {w x y} {
proc ttk::scrollbar::Drag {w x y} {
variable State
if {![info exists State(first)]} {
- # Initial buttonpress was not on the thumb,
+ # Initial buttonpress was not on the thumb,
# or something screwy has happened. In either case, ignore:
return;
}
@@ -112,6 +113,7 @@ proc ttk::scrollbar::Jump {w x y} {
variable State
switch -glob -- [$w identify $x $y] {
+ *grip -
*thumb -
*trough {
set State(first) [$w fraction $x $y]
diff --git a/library/ttk/treeview.tcl b/library/ttk/treeview.tcl
index a9f623c..1aaae78 100644
--- a/library/ttk/treeview.tcl
+++ b/library/ttk/treeview.tcl
@@ -46,7 +46,7 @@ bind Treeview <Shift-ButtonPress-1> \
bind Treeview <<ToggleSelection>> \
{ ttk::treeview::Select %W %x %y toggle }
-ttk::copyBindings TtkScrollable Treeview
+ttk::copyBindings TtkScrollable Treeview
### Binding procedures.
#
@@ -131,7 +131,7 @@ proc ttk::treeview::ActivateHeading {w heading} {
# triggers a <Leave> event. A proc checking if the display column
# $State(activeHeading) is really still present or not could be
# written but it would need to check several special cases:
- # a. -displaycolumns "#all" or being an explicit columns list
+ # a. -displaycolumns "#all" or being an explicit columns list
# b. column #0 display is not governed by the -displaycolumn
# list but by the value of the -show option
# --> Let's rather catch the following line.
diff --git a/library/ttk/ttk.tcl b/library/ttk/ttk.tcl
index 7bae211..665222d 100644
--- a/library/ttk/ttk.tcl
+++ b/library/ttk/ttk.tcl
@@ -122,7 +122,7 @@ proc ttk::LoadThemes {} {
variable library
# "default" always present:
- uplevel #0 [list source [file join $library defaults.tcl]]
+ uplevel #0 [list source [file join $library defaults.tcl]]
set builtinThemes [style theme names]
foreach {theme scripts} {
diff --git a/library/ttk/vistaTheme.tcl b/library/ttk/vistaTheme.tcl
index 06f9361..0700353 100644
--- a/library/ttk/vistaTheme.tcl
+++ b/library/ttk/vistaTheme.tcl
@@ -3,7 +3,7 @@
#
# The Vista theme can only be defined on Windows Vista and above. The theme
-# is created in C due to the need to assign a theme-enabled function for
+# is created in C due to the need to assign a theme-enabled function for
# detecting when themeing is disabled. On systems that cannot support the
# Vista theme, there will be no such theme created and we must not
# evaluate this script.
@@ -151,7 +151,7 @@ namespace eval ttk::theme::vista {
-selectforeground [list !focus SystemWindowText] \
;
-
+
# SCROLLBAR elements (Vista includes a state for 'hover')
ttk::style element create Vertical.Scrollbar.uparrow vsapi \
SCROLLBAR 1 {disabled 4 pressed 3 active 2 hover 17 {} 1} \
@@ -196,7 +196,7 @@ namespace eval ttk::theme::vista {
Vertical.Progressbar.pbar -side bottom -sticky we
}
}
-
+
# Scale
ttk::style element create Horizontal.Scale.slider vsapi \
TRACKBAR 3 {disabled 5 focus 4 pressed 3 active 2 {} 1} \
@@ -220,10 +220,10 @@ namespace eval ttk::theme::vista {
}
}
}
-
+
# Treeview
ttk::style configure Item -padding {4 0 0 0}
-
+
package provide ttk::theme::vista 1.0
}
}