From: SourceForge.net <no...@so...> - 2003-12-10 10:05:09
|
Bugs item #854178, was opened at 2003-12-04 17:26 Message generated for change (Comment added) made by vincentdarley You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112997&aid=854178&group_id=12997 Category: 18. [text] Group: develop: 8.5a0 Status: Open Resolution: None Priority: 5 Submitted By: Don Porter (dgp) Assigned to: Vince Darley (vincentdarley) Summary: textWind-7.* fail Initial Comment: Using 2003-12-04 HEAD on Solaris 9/CDE: ==== textWind-7.1 EmbWinLostSlaveProc procedure FAILED ==== Contents of test case: .t delete 1.0 end .t insert 1.0 "Some sample text" frame .f -width 10 -height 20 -bg $color .t window create 1.2 -window .f update place .f -in .t -x 100 -y 50 update list [winfo geom .f] [.t bbox 1.2] ---- Result was: 10x20+105+55 {19 11 0 0} ---- Result should have been (exact matching): 10x20+104+54 {19 11 0 0} ==== textWind-7.1 FAILED ==== textWind-7.2 EmbWinLostSlaveProc procedure FAILED ==== Contents of test case: .t delete 1.0 end .t insert 1.0 "Some sample text" frame .t.f -width 10 -height 20 -bg $color .t window create 1.2 -window .t.f update place .t.f -x 100 -y 50 update list [winfo geom .t.f] [.t bbox 1.2] ---- Result was: 10x20+105+55 {19 11 0 0} ---- Result should have been (exact matching): 10x20+104+54 {19 11 0 0} ==== textWind-7.2 FAILED ---------------------------------------------------------------------- >Comment By: Vince Darley (vincentdarley) Date: 2003-12-10 10:05 Message: Logged In: YES user_id=32170 I think you'll need to set -padx 0 -pady 0 as well, and then all will be fine. I believe therefore the new result is correct, and the test is in error. ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2003-12-09 21:50 Message: Logged In: YES user_id=80530 one more data point. If I set -bd 0 -highlightthickness 0 and [place ... -x 0 -y 0] then the result is 10x20+1+1 {15 7 0 0} Note the +1+1 shift instead of +0+0 . I don't know where this extra pixel offset comes from, but it appears to be consistently present. ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2003-12-09 21:40 Message: Logged In: YES user_id=80530 If both the -bd and -highlightthickness options of the [text] widget are set to 0, then the result of both tests is: 10x20+101+51 {15 7 0 0} As each pixel is added to either of those options, a pixel is added to the offsets and the bbox results, which seems ok to me. If I set the options of the [place] command to -x 99 -y 49 then the tests pass. This is true on both Solaris and Linux/Alpha. ---------------------------------------------------------------------- Comment By: Vince Darley (vincentdarley) Date: 2003-12-09 16:36 Message: Logged In: YES user_id=32170 I meant (thinking more clearly now): Can you count the pixels to tell whether +55 or +54 is the correct answer? ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2003-12-09 16:23 Message: Logged In: YES user_id=80530 well, when I adjust -bd and -highlightthickness of the [text .t] widget, I shift the values after the +'s, but I also change the 1st and 2nd values in the [bbox] result. I'm not sure what it would mean to "look correct". ---------------------------------------------------------------------- Comment By: Vince Darley (vincentdarley) Date: 2003-12-09 09:19 Message: Logged In: YES user_id=32170 Could you verify whether these test results look correct to you or not? (Taking account of the text widget's border width, highlightthickness and padx/pady --- which you might wish to increase temporarily for testing purposes?). I think it might be that these tests are now in error... ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2003-12-04 17:40 Message: Logged In: YES user_id=80530 Same tests fail the same way on Linux/Alpha/GNOME ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112997&aid=854178&group_id=12997 |