File: layout.test

package info (click to toggle)
tile 0.8.2-2.1
  • links: PTS
  • area: main
  • in suites: lenny, squeeze
  • size: 3,152 kB
  • ctags: 3,093
  • sloc: ansic: 18,144; tcl: 4,607; makefile: 398; sh: 71
file content (33 lines) | stat: -rw-r--r-- 825 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#
# layout.test,v 1.7 2006/11/06 02:30:49 jenglish Exp
#

package require Tk
package require tcltest ; namespace import -force tcltest::*
loadTestedCommands

lappend auto_path .
package require tile

test layout-1.1 "Size computations for mixed-orientation layouts" -body {
    ttk::style theme use default

    set block [image create photo -width 10 -height 10]
    ttk::style element create block image $block
    ttk::style layout Blocks {
	border -children { block } -side left
	border -children { block } -side top
	border -children { block } -side bottom
    }
    ttk::style configure Blocks -borderwidth 1 -relief raised
    ttk::button .b -style Blocks

    pack .b -expand true -fill both

    list [winfo reqwidth .b] [winfo reqheight .b]

} -cleanup { destroy .b } -result [list 24 24] 



tcltest::cleanupTests