summaryrefslogtreecommitdiffstats
path: root/tests/textWind.test
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2018-10-06 14:15:13 (GMT)
committerfvogel <fvogelnew1@free.fr>2018-10-06 14:15:13 (GMT)
commitf991802effc04e52773669fd6844814f13c52746 (patch)
tree152d1318ffb6a689641554302df7942084dd67d6 /tests/textWind.test
parent78c3a3fb7fde872d1ef9f70ee1b146189ffb5b71 (diff)
downloadtk-f991802effc04e52773669fd6844814f13c52746.zip
tk-f991802effc04e52773669fd6844814f13c52746.tar.gz
tk-f991802effc04e52773669fd6844814f13c52746.tar.bz2
Remove useless option database entries
Diffstat (limited to 'tests/textWind.test')
-rw-r--r--tests/textWind.test22
1 files changed, 8 insertions, 14 deletions
diff --git a/tests/textWind.test b/tests/textWind.test
index 3899ab5..5f0c9b0 100644
--- a/tests/textWind.test
+++ b/tests/textWind.test
@@ -11,28 +11,22 @@ namespace import ::tcltest::*
tcltest::configure {*}$argv
tcltest::loadTestedCommands
-# Create entries in the option database to be sure that geometry options
-# like border width have predictable values.
-
-option add *Text.borderWidth 2
-option add *Text.highlightThickness 2
-option add *Text.font {"Courier New" -12}
+deleteWindows
+set fixedFont {"Courier New" -12}
+set fixedHeight [font metrics $fixedFont -linespace]
+set fixedWidth [font measure $fixedFont m]
+set fixedAscent [font metrics $fixedFont -ascent]
-deleteWindows
-# Widget used in tests 1.* - 16.*
+# Widget used in almost all tests
set tWidth 30
set tHeight 6
-text .t -width $tWidth -height $tHeight -bd 2 -highlightthickness 2
+text .t -width $tWidth -height $tHeight -bd 2 -highlightthickness 2 \
+ -font $fixedFont
pack .t -expand 1 -fill both
update
.t debug on
-set fixedFont {"Courier New" -12}
-set fixedHeight [font metrics $fixedFont -linespace]
-set fixedWidth [font measure $fixedFont m]
-set fixedAscent [font metrics $fixedFont -ascent]
-
set color [expr {[winfo depth .t] > 1 ? "green" : "black"}]
wm geometry . {}