diff options
author | jenglish <jenglish@noemail.net> | 2007-11-17 19:17:48 (GMT) |
---|---|---|
committer | jenglish <jenglish@noemail.net> | 2007-11-17 19:17:48 (GMT) |
commit | 9e6d445ec74e277a93b4950a7545835310645fb9 (patch) | |
tree | 87b07f039422079c5e6f18233f42cfb3bcd6d586 /tests/ttk | |
parent | 15bb26a6df4f4a86f9861ff30f27cb505f42d7cb (diff) | |
download | tk-9e6d445ec74e277a93b4950a7545835310645fb9.zip tk-9e6d445ec74e277a93b4950a7545835310645fb9.tar.gz tk-9e6d445ec74e277a93b4950a7545835310645fb9.tar.bz2 |
Swap in core scrollbars for [ttk::scrollbar]s on OSX.
FossilOrigin-Name: 3b33c44dc0eeee8b2b037e1b4eacac58a53119f8
Diffstat (limited to 'tests/ttk')
-rw-r--r-- | tests/ttk/scrollbar.test | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/tests/ttk/scrollbar.test b/tests/ttk/scrollbar.test index f91659a..c83fc9b 100644 --- a/tests/ttk/scrollbar.test +++ b/tests/ttk/scrollbar.test @@ -1,11 +1,42 @@ # -# $Id: scrollbar.test,v 1.1 2006/10/31 01:42:27 hobbs Exp $ +# $Id: scrollbar.test,v 1.2 2007/11/17 19:17:50 jenglish Exp $ # package require Tk 8.5 package require tcltest ; namespace import -force tcltest::* loadTestedCommands +testConstraint coreScrollbar [expr {[tk windowingsystem] eq "aqua"}] + +test scrollbar-swapout-1 "Use core scrollbars on OSX..." -constraints { + coreScrollbar +} -body { + ttk::scrollbar .sb -command "yadda" + list [winfo class .sb] [.sb cget -command] +} -result [list Scrollbar yadda] -cleanup { + destroy .sb +} + +test scrollbar-swapout-2 "... unless -style is specified ..." -constraints { + coreScrollbar +} -body { + ttk::style layout Vertical.Custom.TScrollbar \ + [ttk::style layout Vertical.TScrollbar] ; # See #1833339 + ttk::scrollbar .sb -command "yadda" -style Custom.TScrollbar + list [winfo class .sb] [.sb cget -command] [.sb cget -style] +} -result [list TScrollbar yadda Custom.TScrollbar] -cleanup { + destroy .sb +} + +test scrollbar-swapout-3 "... or -class." -constraints { + coreScrollbar +} -body { + ttk::scrollbar .sb -command "yadda" -class Custom.TScrollbar + list [winfo class .sb] [.sb cget -command] +} -result [list Custom.TScrollbar yadda] -cleanup { + destroy .sb +} + test scrollbar-1.0 "Setup" -body { ttk::scrollbar .tsb } -result .tsb |