Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12412
Modified Files: Tag: devel_0_39 desire.tk Log Message:
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.116 retrieving revision 1.1.2.117 diff -C2 -d -r1.1.2.116 -r1.1.2.117 *** desire.tk 9 Nov 2005 00:40:56 -0000 1.1.2.116 --- desire.tk 9 Nov 2005 01:31:07 -0000 1.1.2.117 *************** *** 589,595 ****
#-----------------------------------------------------------------------------------# - # why didn't you use the font metrics function? --matju - # didn't know it then, was guessing the values to get it to work:/ --chun set font(size) 12 set font(pady) 3 set font(padx) 5 --- 589,596 ----
#-----------------------------------------------------------------------------------# set font(size) 12 + set font(str) [format -*-courier-medium--normal--%d-* $font(size)] + set font(width) [font measure $font(str) W] + set font(height) [font metrics $font(str) -linespace] set font(pady) 3 set font(padx) 5 *************** *** 1077,1090 ****
#-----------------------------------------------------------------------------------# - proc get_font_size {} { - global font - set fontstr [format -*-courier-medium--normal--%d-* $font(size)] - set font(width) [font measure $fontstr W] - set font(height) [font metrics $fontstr -linespace] - # puts "font width: $font(width) | font height: $font(height)" - } - get_font_size - - #-----------------------------------------------------------------------------------# #this just tells whether an object is part of the selection, that is, what usually #make objects turn blue. --- 1078,1081 ---- *************** *** 1142,1145 **** --- 1133,1137 ---- # text = the input text field # confusing?;) + puts "metrics: [font metrics courier]" global font look mset {x1 y1} [$self xy] *************** *** 1152,1157 **** } { $self item TEXT text [l+ {2 2} [list $x1 $y1]] \ ! -font [format -*-courier-medium--normal--%d-* $font(size)] \ ! -text $@text -fill $look(objectfg) -anchor nw puts "text = $@text" } --- 1144,1148 ---- } { $self item TEXT text [l+ {2 2} [list $x1 $y1]] \ ! -font $font(str) -text $@text -fill $look(objectfg) -anchor nw puts "text = $@text" } *************** *** 1174,1178 **** text $t -height 1 -width [expr [string length $@text]+1] -relief flat \ -bg ${look(objectbg)} -borderwidth 0 -highlightthickness 0\ ! -font [format -*-courier-medium--normal--%d-* $font(size)] #text $t -height 1 -width $@textchars -relief flat \ # -bg ${look(objectbg)} -borderwidth 0 -highlightthickness 0\ --- 1165,1169 ---- text $t -height 1 -width [expr [string length $@text]+1] -relief flat \ -bg ${look(objectbg)} -borderwidth 0 -highlightthickness 0\ ! -font $font(str) #text $t -height 1 -width $@textchars -relief flat \ # -bg ${look(objectbg)} -borderwidth 0 -highlightthickness 0\ *************** *** 1704,1709 **** } move { ! set @selection {} ! puts "selection:$@selection" } } --- 1695,1702 ---- } move { ! if {$@select_by == "click"} { ! set @selection {} ! } ! #puts "selection:$@selection" } }