summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorjenglish@flightlab.com <jenglish>2007-11-17 19:17:49 (GMT)
committerjenglish@flightlab.com <jenglish>2007-11-17 19:17:49 (GMT)
commitaa9b715d73fa4756fd0276766a0cf564081ee7fe (patch)
tree87b07f039422079c5e6f18233f42cfb3bcd6d586 /library
parent4c9f66dd689635b7bfc628079f56cf411fd13798 (diff)
downloadtk-aa9b715d73fa4756fd0276766a0cf564081ee7fe.zip
tk-aa9b715d73fa4756fd0276766a0cf564081ee7fe.tar.gz
tk-aa9b715d73fa4756fd0276766a0cf564081ee7fe.tar.bz2
Swap in core scrollbars for [ttk::scrollbar]s on OSX.
Diffstat (limited to 'library')
-rw-r--r--library/ttk/scrollbar.tcl20
1 files changed, 19 insertions, 1 deletions
diff --git a/library/ttk/scrollbar.tcl b/library/ttk/scrollbar.tcl
index 6b37b24..b901325 100644
--- a/library/ttk/scrollbar.tcl
+++ b/library/ttk/scrollbar.tcl
@@ -1,9 +1,27 @@
#
-# $Id: scrollbar.tcl,v 1.1 2006/10/31 01:42:27 hobbs Exp $
+# $Id: scrollbar.tcl,v 1.2 2007/11/17 19:17:50 jenglish Exp $
#
# Bindings for TScrollbar widget
#
+# Still don't have a working ttk::scrollbar under OSX -
+# Swap in a [tk::scrollbar] on that platform,
+# unless user specifies -class or -style.
+#
+if {[tk windowingsystem] eq "aqua"} {
+ rename ::ttk::scrollbar ::ttk::_scrollbar
+ proc ttk::scrollbar {w args} {
+ set constructor ::scrollbar
+ foreach {option _} $args {
+ if {$option eq "-class" || $option eq "-style"} {
+ set constructor ::ttk::_scrollbar
+ break
+ }
+ }
+ return [eval [linsert $args 0 $constructor $w]]
+ }
+}
+
namespace eval ttk::scrollbar {
variable State
# State(xPress) --