Tk Source Code

Check-in [d4c30b44]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to tclconference@googlegroups.com
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Two text tests also try to position a window with y = 0. Tweak these for Aqua.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | bug-2249e64bdc
Files: files | file ages | folders
SHA3-256:d4c30b4443903ddbe6cf3764251cfa2a41b6e0eb4c4300dce4cb675dc45fbcec
User & Date: culler 2019-02-13 16:12:16
Context
2019-02-13
21:01
Fix bug [2249e64bdc]: adjust unixWm tests which expect impossible results on Aqua. check-in: 30198903 user: culler tags: core-8-6-branch
16:12
Two text tests also try to position a window with y = 0. Tweak these for Aqua. Closed-Leaf check-in: d4c30b44 user: culler tags: bug-2249e64bdc
15:49
Fix bug [2249e64bdc]: Some unixWm tests expect the impossible on Aqua check-in: 9a0e3174 user: culler tags: bug-2249e64bdc
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to tests/text.test.

3470
3471
3472
3473
3474
3475
3476






3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493

3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
} -cleanup {
    destroy .top
} -result {150x140+}
# This test was failing Windows because the title bar on .t was a certain
# minimum size and it was interfering with the size requested by the -setgrid.
# The "overrideredirect" gets rid of the titlebar so the toplevel can shrink
# to the appropriate size.






test text-14.19 {ConfigureText procedure} -setup {
    toplevel .top
    text .top.t -font {Courier -12} -borderwidth 2 -highlightthickness 2
} -body {
    .top.t configure -width 20 -height 10 -setgrid 1
    wm overrideredirect .top 1
    pack .top.t
    wm geometry .top +0+0
    update
    wm geometry .top
} -cleanup {
    destroy .top
} -result {20x10+0+0}
# This test was failing on Windows because the title bar on .t was a certain
# minimum size and it was interfering with the size requested by the -setgrid.
# The "overrideredirect" gets rid of the titlebar so the toplevel can shrink
# to the appropriate size.

test text-14.20 {ConfigureText procedure} -setup {
    toplevel .top
    text .top.t -font {Courier -12} -borderwidth 2 -highlightthickness 2
} -body {
    .top.t configure -width 20 -height 10 -setgrid 1
    wm overrideredirect .top 1
    pack .top.t
    wm geometry .top +0+0
    update
    set result [wm geometry .top]
    wm geometry .top 15x8
    update
    lappend result [wm geometry .top]
    .top.t configure -wrap word
    update
    lappend result [wm geometry .top]
} -cleanup {
    destroy .top
} -result {20x10+0+0 15x8+0+0 15x8+0+0}


test text-15.1 {TextWorldChanged procedure, spacing options} -constraints {
    fonts
} -body {
    text .t -width 20 -height 10 -font {Courier -12} -borderwidth 2 -highlightthickness 2
    set result [winfo reqheight .t]







>
>
>
>
>
>







|




|




>







|










|







3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
} -cleanup {
    destroy .top
} -result {150x140+}
# This test was failing Windows because the title bar on .t was a certain
# minimum size and it was interfering with the size requested by the -setgrid.
# The "overrideredirect" gets rid of the titlebar so the toplevel can shrink
# to the appropriate size.
# On macOS, however, there is no way to make the window overlap the menubar.
if {[tk windowingsystem] == "aqua"} {
    set minY 23
} else {
    set minY 0
}
test text-14.19 {ConfigureText procedure} -setup {
    toplevel .top
    text .top.t -font {Courier -12} -borderwidth 2 -highlightthickness 2
} -body {
    .top.t configure -width 20 -height 10 -setgrid 1
    wm overrideredirect .top 1
    pack .top.t
    wm geometry .top +0+$minY
    update
    wm geometry .top
} -cleanup {
    destroy .top
} -result "20x10+0+$minY"
# This test was failing on Windows because the title bar on .t was a certain
# minimum size and it was interfering with the size requested by the -setgrid.
# The "overrideredirect" gets rid of the titlebar so the toplevel can shrink
# to the appropriate size.
# On macOS we again use minY as a workaround.
test text-14.20 {ConfigureText procedure} -setup {
    toplevel .top
    text .top.t -font {Courier -12} -borderwidth 2 -highlightthickness 2
} -body {
    .top.t configure -width 20 -height 10 -setgrid 1
    wm overrideredirect .top 1
    pack .top.t
    wm geometry .top +0+$minY
    update
    set result [wm geometry .top]
    wm geometry .top 15x8
    update
    lappend result [wm geometry .top]
    .top.t configure -wrap word
    update
    lappend result [wm geometry .top]
} -cleanup {
    destroy .top
} -result "20x10+0+$minY 15x8+0+$minY 15x8+0+$minY"


test text-15.1 {TextWorldChanged procedure, spacing options} -constraints {
    fonts
} -body {
    text .t -width 20 -height 10 -font {Courier -12} -borderwidth 2 -highlightthickness 2
    set result [winfo reqheight .t]