Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13720
Modified Files: Tag: devel_0_39 desire.tk Log Message: fixed per-object fonts (Labeled class and such). fixed problem with comment bevel disappearing. fixed global font selector.
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.504 retrieving revision 1.1.2.505 diff -C2 -d -r1.1.2.504 -r1.1.2.505 *** desire.tk 14 Oct 2006 09:40:50 -0000 1.1.2.504 --- desire.tk 14 Oct 2006 11:10:30 -0000 1.1.2.505 *************** *** 1026,1036 **** } ! if {$type == "text"} { ! 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] ! } }
--- 1026,1034 ---- } ! set find [lsearch $args "-font"] ! if {$find >= 0} { ! set font [lindex $args [expr $find + 1]] ! set new_size [format %.0f [expr [lindex $font 1]*$zoom]] ! set args [lreplace $args [expr $find + 1] [expr $find + 1] [lreplace $font 1 1 $new_size]] }
*************** *** 1784,1788 **** $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" --- 1782,1786 ---- $self update_size set font_str [$self look font] ! set new_size [format %.0f [expr [lindex $font_str 1]*$_($@canvas:zoom)]] set font_str [lreplace $font_str 1 1 $new_size] #puts " text to edit::: $@text" *************** *** 3699,3702 **** --- 3697,3702 ---- $self item BASE2 line $xyc -fill [$self look frame2] [$@canvas widget] lower ${self}BASE ${self}TEXT + [$@canvas widget] raise ${self}BASE1 ${self}BASE + [$@canvas widget] raise ${self}BASE2 ${self}BASE }
*************** *** 4173,4178 **** set focused [$self == [$@canvas focus]] if {$focused} {set color4 #00ff00} {set color4 [$self look bg]} ! $self item BASE polygon $points -fill [parse_color $@bcol] -outline [$self look frame3] ! $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] --- 4173,4178 ---- set focused [$self == [$@canvas focus]] if {$focused} {set color4 #00ff00} {set color4 [$self look bg]} ! $self item BASE polygon $points -outline [$self look frame3] -fill [parse_color $@bcol] ! $self item BASE4 polygon $points2 -outline [$self look frame3] -fill $color4 $self item NUMBER text [list $xt $yt] -anchor w -text $@text \ -font [$self look font] -fill [parse_color $@fcol] *************** *** 5634,5638 **** set font $look(View:font) set @family [lindex $font 0] ! set @size [lindex $font 1] set @bold [expr [lsearch $font bold ]>=0] set @italic [expr [lsearch $font italic]>=0] --- 5634,5638 ---- set font $look(View:font) set @family [lindex $font 0] ! set @size [expr -[lindex $font 1]] set @bold [expr [lsearch $font bold ]>=0] set @italic [expr [lsearch $font italic]>=0] *************** *** 5654,5658 **** frame $f.font.size ! pack [label $f.font.size.label -text "Size:"] -side left pack [spinbox $f.font.size.entry -relief sunken -textvariable fontsize -width 4 \ -command "$self font_changesize $f %d"] -side left --- 5654,5658 ---- frame $f.font.size ! pack [label $f.font.size.label -text [say font_size]] -side left pack [spinbox $f.font.size.entry -relief sunken -textvariable fontsize -width 4 \ -command "$self font_changesize $f %d"] -side left *************** *** 5686,5689 **** --- 5686,5690 ---- pack $f.font -side top -fill both -padx $padx -pady $pady pack $f.font2 -side bottom -fill x -padx $padx -pady $pady + $self font_update $f }
*************** *** 5697,5701 **** set lb $f.font.list.box set @family [$lb get [$lb curselection]] ! set @str [list $@family $@size] if {$@bold } {lappend @str bold } if {$@italic} {lappend @str italic} --- 5698,5702 ---- set lb $f.font.list.box set @family [$lb get [$lb curselection]] ! set @str [list $@family [expr -$@size]] if {$@bold } {lappend @str bold } if {$@italic} {lappend @str italic} *************** *** 6234,6238 **** #this retrives the values set in the editor def ClientPrefsDialog get_val {} { ! global ddrc_options look key set check_key {} foreach {type class name} $ddrc_options { --- 6235,6239 ---- #this retrives the values set in the editor def ClientPrefsDialog get_val {} { ! global ddrc_options look key set check_key {} foreach {type class name} $ddrc_options { *************** *** 6242,6246 **** set str2 ${str}path set new_color [$@$str2 cget -background] ! set look($class:$name) $new_color } key { --- 6243,6247 ---- set str2 ${str}path set new_color [$@$str2 cget -background] ! set look($class:$name) $new_color } key { *************** *** 6259,6263 **** } if {[dict exists $check_key $new_key] && $new_key != ""} { ! error "$new_key already assigned" } else {dict set check_key $new_key key($item)} set key($class:$item) $new_key --- 6260,6264 ---- } if {[dict exists $check_key $new_key] && $new_key != ""} { ! error "$new_key already assigned" } else {dict set check_key $new_key key($item)} set key($class:$item) $new_key *************** *** 6270,6274 **** } font { ! $self font_update set look(View:font) $@str } --- 6271,6275 ---- } font { ! # $self font_update set look(View:font) $@str }