Overview
Artifact ID: | a568f21bdffaad42336dec9ce7ddebbb4bbb278c |
---|---|
Ticket: | 7703f947aa6682d6cc057798f2029d50bef3c24e
Many many issues with elided lines in the text widget |
User & Date: | fvogel 2014-12-28 15:14:49 |
Changes
- icomment:
Fixed (in branch text-elided) bad counting of the total number of vertical pixels in the text widget, resulting in small change of the Y scrollbar size. Happened because CalculateDisplayLineHeight expects an index at start of a display line, which was not always the case. Test case 'J': -------------- package require Tk entry .e2 -justify center -width 50 pack .e2 pack [text .t -width 30 -yscroll ".s set"] [scrollbar .s -command ".t yview"] -side left -fill y pack configure .t -expand 1 -fill both for {set i 1} {$i < 25} {incr i} { .t insert end "Line $i\n" } wm geometry . 300x200+0+0 .t tag add hidden 5.7 11.0 .t tag configure hidden -elide true update set y1 [lindex [.t yview] 1] .t count -displaylines 5.0 11.0 ; # makes scrollbar change size! set y2 [lindex [.t yview] 1] .t count -displaylines 5.0 12.0 ; # makes scrollbar size OK again! set y3 [lindex [.t yview] 1] list [expr {$y1 == $y2}] [expr {$y1 == $y3}] ; # shall be {1 1}
- login: "fvogel"
- mimetype: "text/plain"