Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18594
Modified Files: Tag: devel_0_39 desire.tk Log Message: ddrc editor now all uses iemgui_choose_col, still have small things needs to be fixed, but it worx.
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.192 retrieving revision 1.1.2.193 diff -C2 -d -r1.1.2.192 -r1.1.2.193 *** desire.tk 26 Apr 2006 11:04:52 -0000 1.1.2.192 --- desire.tk 26 Apr 2006 14:52:41 -0000 1.1.2.193 *************** *** 3329,3338 **** global _ preset_colors set _($self:$name) $c ! .$self.$name.color configure \ ! -background [format #%6.6x $_($self:$name)] \ ! -highlightbackground [format #%6.6x $_($self:$name)] }
proc color_popup {self w name i} { set old_w $w.$name set w $w.$name.popup --- 3329,3340 ---- global _ preset_colors set _($self:$name) $c ! .$self.$name configure \ ! -background [format #%6.6x $_($self:$name)] ! # somehow this hilites one more pixel outside of what it should be ! #-highlightbackground [format #%6.6x $_($self:$name)] }
proc color_popup {self w name i} { + set self [string trimleft $self .] set old_w $w.$name set w $w.$name.popup *************** *** 3346,3355 **** -command [list color_popup_select $self $name [expr 0x$c]] } ! tk_popup $w [expr [winfo rootx $old_w.preset] + 30] [expr [winfo rooty $old_w.preset]] }
proc iemgui_choose_col {id var title} { set self [string trimleft $id .] - puts "self ::: $self" global _ look #set c $_($self:$var) --- 3348,3356 ---- -command [list color_popup_select $self $name [expr 0x$c]] } ! tk_popup $w [expr [winfo rootx $old_w]] [expr [winfo rooty $old_w]] }
proc iemgui_choose_col {id var title} { set self [string trimleft $id .] global _ look #set c $_($self:$var) *************** *** 3359,3362 **** --- 3360,3364 ---- # -initialcolor [format "#%6.6x" [expr $c&0xFFFFFF]]] set color [tk_chooseColor -title $title -initialcolor $title] + $id.$var configure -text $color if {$color != ""} { color_popup_select $self $var [expr [string replace $color 0 0 "0x"]&0xFFFFFF] *************** *** 3390,3394 **** } color { - puts "where ::: $f" frame $f label $f.label -text $label --- 3392,3395 ---- *************** *** 3399,3408 **** set c 0xFCFCFC button $f.color -text $look($name) -font {Courier 8} -width 10 -pady 2 \ ! -command [list iemgui_choose_col $w $name $label] \ ! -relief sunken -background [format #%6.6x $c] \ -highlightbackground [format #%6.6x $c] set i 10 ! puts "self : $self | w : $w | name : $name" ! button $f.preset -text "..." -pady 2 -font {Helvetica 8} -command [list color_popup $self $w $name $i] pack $f.label $f.color $f.preset -side left } --- 3400,3409 ---- set c 0xFCFCFC button $f.color -text $look($name) -font {Courier 8} -width 10 -pady 2 \ ! -command [list iemgui_choose_col $w $name.color $look($name)] \ ! -relief sunken -background $look($name) \ -highlightbackground [format #%6.6x $c] set i 10 ! #puts "self : $self | w : $w | name : $name" ! button $f.preset -text "..." -pady 2 -font {Helvetica 8} -command [list color_popup $w $w $name.color $i] pack $f.label $f.color $f.preset -side left } *************** *** 3424,3438 **** } - choice_color { - frame $f - pack [label $f.label -text $label] -side left - button $f.color_chooser -bg $look($name) -activebackground $look($name) -command "color_popup2 $f $look($name)" \ - -width 17 - pack $f.color_chooser -side left - - } subsection { #frame $f - puts "path ===== $f" label $f -text $label -bg "#0000aa" -fg "#ffff55" -font {helvetica -10 bold} #$self add_subsection $f $name --- 3425,3430 ---- *************** *** 3776,3780 **** color selrect section test - colors canvasbgedit }
--- 3768,3771 ---- *************** *** 3863,3872 **** } color { - #properties_dialog $which_self $f.main.$section ClientPrefsDialog_ok client \ - # [list [lindex $name 0] "$desc" choice_color {}] - properties_dialog $which_self $which_section ClientPrefsDialog_ok client \ - [list [lindex $name 0] [say $name] choice_color {}] - } - colors { properties_dialog $which_self $which_section ClientPrefsDialog_ok client \ [list [lindex $name 0] [say $name] color {}] --- 3854,3857 ----