[PD-cvs] pd/src desire.tk,1.1.2.502,1.1.2.503
Mathieu Bouchard
matju at users.sourceforge.net
Sat Oct 14 01:41:00 CEST 2006
Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20173
Modified Files:
Tag: devel_0_39
desire.tk
Log Message:
getting rid of xfld (part 2)
Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.502
retrieving revision 1.1.2.503
diff -C2 -d -r1.1.2.502 -r1.1.2.503
*** desire.tk 13 Oct 2006 22:30:05 -0000 1.1.2.502
--- desire.tk 13 Oct 2006 23:40:56 -0000 1.1.2.503
***************
*** 1029,1036 ****
set find [lsearch $args "-font"]
if {$find >= 0} {
! #set new_size [format %.0f [expr $font(size)*$zoom]]
! set new_size [format %.0f [expr [$self look fontsize]*$zoom]]
! #set s [format $font(str2) $new_size]
! set s [format [$self look fontstring2] $new_size]
set args [lreplace $args [expr $find + 1] [expr $find + 1] $s]
}
--- 1029,1034 ----
set find [lsearch $args "-font"]
if {$find >= 0} {
! set new_size [format %.0f [expr [lindex [$self look font] 1]*$zoom]]
! set s [format [$self look font] $new_size]
set args [lreplace $args [expr $find + 1] [expr $find + 1] $s]
}
***************
*** 1756,1760 ****
} {
$self item TEXT text [l+ {2 2} [list $x1 $y1]] \
! -font [$self look fontstring] -text $@text \
-fill [$self look fg] -anchor nw
}
--- 1754,1758 ----
} {
$self item TEXT text [l+ {2 2} [list $x1 $y1]] \
! -font [$self look font] -text $@text \
-fill [$self look fg] -anchor nw
}
***************
*** 1780,1785 ****
$c delete ${self}TEXT
$self update_size
! set new_size [format %.0f [expr [$self look fontsize]*$_($@canvas:zoom)]]
! set font_str [format [$self look fontstring2] $new_size]
#puts " text to edit::: $@text"
set l {};set nl 1;set newline {-1};set i 0;set width 0
--- 1778,1784 ----
$c delete ${self}TEXT
$self update_size
! set font_str [$self look font]
! set new_size [format %.0f [expr $font_str*$_($@canvas:zoom)]]
! set font_str [lreplace $font_str 1 1 $new_size]
#puts " text to edit::: $@text"
set l {};set nl 1;set newline {-1};set i 0;set width 0
***************
*** 1855,1867 ****
set t $c.${self}text
set padx [$self look fontpadx];set pady [$self look fontpady]
! set width [font measure [$self look fontstring] W]
#set width [$self look fontwidth];set height [$self look fontheight]
if {[winfo exists $c.${self}text]} {
set height [expr [lindex [$t configure -height] 4] * \
! [font metrics [$self look fontstring] -linespace]]
} else {
! set height [expr [font metrics [$self look fontstring] -linespace] * $nl]
}
! #set height [expr [font metrics [$self look fontstring] -linespace] * $nl]
set textwidth [expr $padx+$width*($n+$@edit)]
if {[llength [$c gettags ${self}TEXT]]} {
--- 1854,1866 ----
set t $c.${self}text
set padx [$self look fontpadx];set pady [$self look fontpady]
! set width [font measure [$self look font] W]
#set width [$self look fontwidth];set height [$self look fontheight]
if {[winfo exists $c.${self}text]} {
set height [expr [lindex [$t configure -height] 4] * \
! [font metrics [$self look font] -linespace]]
} else {
! set height [expr [font metrics [$self look font] -linespace] * $nl]
}
! #set height [expr [font metrics [$self look font] -linespace] * $nl]
set textwidth [expr $padx+$width*($n+$@edit)]
if {[llength [$c gettags ${self}TEXT]]} {
***************
*** 3676,3680 ****
# -text $string -fill [$self look fg] -font $font(str) -anchor nw
$self item TEXT text [l+ {2 2} [list $x1 $y1]] \
! -text $string -fill [$self look fg] -font [$self look fontstring] -anchor nw
}
--- 3675,3679 ----
# -text $string -fill [$self look fg] -font $font(str) -anchor nw
$self item TEXT text [l+ {2 2} [list $x1 $y1]] \
! -text $string -fill [$self look fg] -font [$self look font] -anchor nw
}
***************
*** 4077,4082 ****
if {!$@w} {set @w 5}
set padx [$self look fontpadx];set pady [$self look fontpady]
! set width [font measure [$self look fontstring] W]
! set height [font metrics [$self look fontstring] -linespace]
#set width [$self look fontwidth];set height [$self look fontheight]
set textwidth [expr $padx+$width*$@w]
--- 4076,4081 ----
if {!$@w} {set @w 5}
set padx [$self look fontpadx];set pady [$self look fontpady]
! set width [font measure [$self look font] W]
! set height [font metrics [$self look font] -linespace]
#set width [$self look fontwidth];set height [$self look fontheight]
set textwidth [expr $padx+$width*$@w]
***************
*** 4140,4145 ****
global font
set padx [$self look fontpadx];set pady [$self look fontpady]
! set width [font measure [$self look fontstring] W]
! set height [font metrics [$self look fontstring] -linespace]
#set width [$self look fontwidth];set height [$self look fontheight]
set textwidth [expr $padx+$width*[string length $@buf]]
--- 4139,4144 ----
global font
set padx [$self look fontpadx];set pady [$self look fontpady]
! set width [font measure [$self look font] W]
! set height [font metrics [$self look font] -linespace]
#set width [$self look fontwidth];set height [$self look fontheight]
set textwidth [expr $padx+$width*[string length $@buf]]
***************
*** 4171,4175 ****
$self item BASE4 polygon $points2 -fill $color4 -outline [$self look frame3]
$self item NUMBER text [list $xt $yt] -anchor w -text $@text \
! -font [$self look fontstring] -fill [parse_color $@fcol]
$c delete ${self}CURS
if {[string length $@buf]>0} {
--- 4170,4174 ----
$self item BASE4 polygon $points2 -fill $color4 -outline [$self look frame3]
$self item NUMBER text [list $xt $yt] -anchor w -text $@text \
! -font [$self look font] -fill [parse_color $@fcol]
$c delete ${self}CURS
if {[string length $@buf]>0} {
***************
*** 4772,4776 ****
if {$cmdline(console) != 0} {
frame .log
! text .log.1 -width 60 -height 30 -yscrollcommand ".log.2 set" -font $look(View:fontstring)
scrollbar .log.2 -command ".log.1 yview"
global tcl_version tk_version pd_myversion tcl_platform OS
--- 4771,4775 ----
if {$cmdline(console) != 0} {
frame .log
! text .log.1 -width 60 -height 30 -yscrollcommand ".log.2 set" -font $look(View:font)
scrollbar .log.2 -command ".log.1 yview"
global tcl_version tk_version pd_myversion tcl_platform OS
***************
*** 4838,4843 ****
pack [frame $serf.1.1] -side bottom
pack [button $serf.1.1.expander -image icon_plus -command "$self toggle_expand"] -side left
! pack [label $serf.1.1.label -text "$name: " -font $look(View:fontstring)] -side left
! pack [entry $serf.entry -width 40 -font $look(View:fontstring)] -side left -fill x -expand yes
pack $serf -fill x -expand no
bind $serf.entry <Up> "$self up"
--- 4837,4842 ----
pack [frame $serf.1.1] -side bottom
pack [button $serf.1.1.expander -image icon_plus -command "$self toggle_expand"] -side left
! pack [label $serf.1.1.label -text "$name: " -font $look(View:font)] -side left
! pack [entry $serf.entry -width 40 -font $look(View:font)] -side left -fill x -expand yes
pack $serf -fill x -expand no
bind $serf.entry <Up> "$self up"
***************
*** 5224,5228 ****
-bg [$canvas look compbg] -selectbackground [$canvas look compselectbg] \
-activestyle dotbox -selectforeground [$canvas look compselectfg] -fg [$canvas look compfg] \
! -font $look(View:fontstring)
$self fill_box [$@textbox get 1.0 1.end]
$f configure -width $@width
--- 5223,5227 ----
-bg [$canvas look compbg] -selectbackground [$canvas look compselectbg] \
-activestyle dotbox -selectforeground [$canvas look compselectfg] -fg [$canvas look compfg] \
! -font $look(View:font)
$self fill_box [$@textbox get 1.0 1.end]
$f configure -width $@width
***************
*** 5632,5636 ****
set @bold [expr [lsearch $font bold ]>=0]
set @italic [expr [lsearch $font italic]>=0]
- # set @fstr $look(View:fontstring)
logvar @family @size @bold @italic
frame $f.font
--- 5631,5634 ----
***************
*** 6265,6268 ****
--- 6263,6267 ----
}
font {
+ $self font_update
set look(View:font) $@str
}
More information about the Pd-cvs
mailing list