Changeset 3642


Ignore:
Timestamp:
May 9, 2013 11:29:37 AM (9 years ago)
Author:
mmc
Message:

Fixes for nanoHUB ticket #258058 and #258045 -- note within a group tab
doesn't fill out the area properly. Should work better now. Also fixed
tabs to contain the window, instead of floating above the cotents as they
have for a long time.

Fixed boolean controls to have a more obvious on/off switch instead of a
checkbox. Fixed integers and spinners to use larger +/- buttons that are
easier to press on an iPad. Fixed numbers and other gauges to have the
same relief style as entries and other widgets.

Added new layout styles to groups: horizontal, vertical, tabs, and sentence.
You can now explicitly make a layout vertical instead of tabs by setting
the layout to "vertical" instead of throwing in a separator. Updated the
zoo/groups example to show off new horizontal and sentence types.

Fixed the "drawing" example in the zoo to gray out the trapezoid top when
it is disabled.

Location:
trunk
Files:
4 added
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/examples/zoo/drawing/tool.xml

    r3636 r3642  
    1616 </tool>
    1717 <input>
    18     <boolean id="trapezoid_top">
     18    <boolean id="trapezoid_top_enable">
    1919      <about> <label>Enable trapezoid top</label> </about>
    2020      <default>off</default>
     
    4747     <name>trapezoid_top</name>
    4848     <path>input.number(trapezoid_top)</path>
     49    </variable>
     50    <variable>
     51     <name>trapezoid_top_color</name>
     52     <path>input.boolean(trapezoid_top_enable)</path>
     53     <map><from>no</from><to>gray</to></map>
     54     <map><from>yes</from><to>black</to></map>
    4955    </variable>
    5056    <variable>
     
    109115    <line id="trapezoid_top">
    110116     <coords>.35 .38 .65 .38</coords>
    111      <color>black</color>
     117     <color>${trapezoid_top_color}</color>
    112118     <linewidth>2</linewidth>
    113119     <arrow>both</arrow>
     
    115121    <text id="trapezoid_top">
    116122     <coords>.5 .35</coords>
    117      <color>black</color>
     123     <color>${trapezoid_top_color}</color>
    118124     <text>Length of Trapezoid Top = ${trapezoid_top}</text>
    119125     <font>Arial 11</font>
     
    186192    <label>Trapezoid Top</label>
    187193    <description>Width of the Trapezoid Top.</description>
    188     <enable>input.boolean(trapezoid_top)</enable>
     194    <enable>input.boolean(trapezoid_top_enable)</enable>
    189195   </about>
    190196   <units>nm</units>
  • trunk/examples/zoo/group/tool.xml

    r72 r3642  
    2929        <about>
    3030          <label>Minority carrier lifetimes</label>
     31          <layout>horizontal</layout>
    3132        </about>
    3233
     
    4950        <default>300K</default>
    5051      </number>
     52      <group id="loc">
     53        <about> <layout>sentence:Location = (${lat},${long})</layout> </about>
     54        <number id="lat">
     55          <about> <label>Latitude</label> </about>
     56          <default>40.42</default>
     57        </number>
     58        <number id="long">
     59          <about> <label>Longitude</label> </about>
     60          <default>-86.91</default>
     61        </number>
     62      </group>
    5163    </group>
    5264  </group>
  • trunk/examples/zoo/note/tool.xml

    r794 r3642  
    55  <about>Example of a Rappture &lt;note&gt; object.
    66
    7 Notes are not really inputs or outputs, but descriptive explanations
    8 to the user.  The contents of a note can be arbitrary HTML, so it
    9 can contain images, hyperlinks, etc.
     7Notes are not really inputs or outputs, but descriptive explanations to the user.  The contents of a note can be arbitrary HTML, so it can contain images, hyperlinks, etc.
    108  </about>
    119  <command>
  • trunk/gui/scripts/controls.tcl

    r3636 r3642  
    2323    inherit itk::Widget
    2424
     25    itk_option define -layout layout Layout ""
    2526    itk_option define -padding padding Padding 0
    2627
     
    5051    private variable _showing ""     ;# list of enabled (showing) controls
    5152    private variable _name2info      ;# maps control name => info
    52     private variable _scheme ""      ;# layout scheme (tabs/hlabels)
     53    private variable _scheme ""      ;# layout scheme (tabs/vert/horz/sentence)
     54    private variable _sentenceparts  ;# info for layout scheme "sentence:"
    5355}
    5456                                                                               
     
    7375
    7476    set _tabs [blt::tabset $f.tabs -borderwidth 0 -relief flat \
    75         -side top -tearoff 0 -highlightthickness 0 \
     77        -side top -tearoff 0 -samewidth 0 -highlightthickness 0 \
    7678        -selectbackground $itk_option(-background) \
    7779        -selectcommand [itcl::code $this _changeTabs -user]]
    78 
    79     set _frame [frame $f.inner]
     80    pack $_tabs -expand yes -fill both
     81
     82    set _frame [frame $_tabs.inner]
    8083    pack $_frame -expand yes -fill both
    8184
     
    124127
    125128    set _name2info($name-path) $path
     129    set _name2info($name-id) [$_owner xml element -as id $path]
    126130    set _name2info($name-label) ""
    127131    set _name2info($name-type) ""
     
    175179        }
    176180        separator {
    177             # no widget to create
    178             set _name2info($name-value) "--"
     181            frame $w -class Separator -height 10
    179182        }
    180183        note {
     
    194197    # its controlling widget here.
    195198    #
    196     set notify [string trim [$_owner xml get $path.about.notify]]
    197 
    198199    set disablestyle [string trim [$_owner xml get $path.about.disablestyle]]
    199200    if { $disablestyle != "" } {
     
    422423    # Clear any existing layout
    423424    #
     425    foreach {rmax cmax} [grid size $_frame] break
     426    for {set r 0} {$r < $rmax} {incr r} {
     427        grid rowconfigure $_frame $r -weight 0 -minsize 0
     428    }
     429    grid rowconfigure $_frame 99 -weight 0
     430
     431    for {set c 0} {$c < $cmax} {incr c} {
     432        grid columnconfigure $_frame $c -weight 0 -minsize 0
     433    }
     434
    424435    foreach name $_controls {
    425436        foreach elem {label value} {
    426437            set w $_name2info($name-$elem)
    427             if {$w != "" && [winfo exists $w]} {
     438            if {$w ne "" && [winfo exists $w]} {
    428439                grid forget $w
    429440            }
    430441        }
    431442    }
     443    grid forget $_frame.empty
     444
    432445    if {[$_tabs size] > 0} {
    433446        $_tabs delete 0 end
    434447    }
    435     grid forget $_frame.empty
    436448
    437449    #
     
    459471                lappend showing $name
    460472                if {$show ne "" && $show} {
    461                     if {[winfo exists $vwidget]} {
    462                         $vwidget configure -state normal
    463                     }
     473                    catch {$vwidget configure -state normal}
    464474                    if {[winfo exists $lwidget]} {
    465475                        $lwidget configure -foreground \
     
    467477                    }
    468478                } else {
    469                     if {[winfo exists $vwidget]} {
    470                         $vwidget configure -state disabled
    471                     }
     479                    catch {$vwidget configure -state disabled}
    472480                    if {[winfo exists $lwidget]} {
    473481                        $lwidget configure -foreground gray
     
    485493    #
    486494    # Decide on a layout scheme:
    487     #   tabs ...... best if all elements within are groups
    488     #   hlabels ... horizontal labels (label: value)
    489     #
    490     if {[llength $showing] >= 2} {
    491         # assume tabs for multiple groups
    492         set _scheme tabs
    493         foreach name $showing {
    494             set w $_name2info($name-value)
    495 
    496             if {$w == "--" || [winfo class $w] != "GroupEntry"} {
    497                 # something other than a group? then fall back on hlabels
    498                 set _scheme hlabels
    499                 break
    500             }
    501         }
    502     } else {
    503         set _scheme hlabels
    504     }
    505 
    506     switch -- $_scheme {
     495    #   default ...... tabs for groups of groups; vertical otherwise
     496    #   tabs ......... tabbed notebook
     497    #   vertical ..... "label: value" down in rows
     498    #   horizontal ... "label: value" across columns
     499    #   sentence ..... text with embedded widgets
     500    #
     501    set _scheme $itk_option(-layout)
     502    if {$_scheme eq "" || $_scheme eq "tabs"} {
     503        if {[llength $showing] < 2} {
     504            set _scheme "vertical"
     505        } else {
     506            set _scheme "tabs"
     507            foreach name $showing {
     508                set w $_name2info($name-value)
     509                if {[lsearch {GroupEntry Separator} [winfo class $w]] < 0} {
     510                    # something other than a group? then fall back on vertical
     511                    set _scheme "vertical"
     512                    break
     513                }
     514            }
     515        }
     516    }
     517
     518    # if the layout is "sentence:..." then create new parts
     519    if {[string match {sentence:*} $itk_option(-layout)]
     520          && [array size _sentenceparts] == 0} {
     521        set n 0
     522        set font [option get $itk_component(hull) labelFont Font]
     523        set str [string range $itk_option(-layout) 9 end]
     524        while {[regexp -indices {\$\{([a-zA-Z0-9_]+)\}} $str match name]} {
     525            foreach {s0 s1} $name break
     526            set name [string range $str $s0 $s1]
     527
     528            # create a label for the string before the substitution
     529            foreach {s0 s1} $match break
     530            set prefix [string trim [string range $str 0 [expr {$s0-1}]]]
     531            if {$prefix ne ""} {
     532                set lname $_frame.sentence[incr n]
     533                label $lname -text $prefix -font $font
     534                lappend _sentenceparts(all) $lname
     535                lappend _sentenceparts(fragments) $lname
     536            }
     537
     538            # add the widget for the substitution part
     539            set found ""
     540            foreach c $_controls {
     541                if {$_name2info($c-id) eq $name} {
     542                    set found $c
     543                    break
     544                }
     545            }
     546            if {$found ne ""} {
     547                lappend _sentenceparts(all) $_name2info($found-value)
     548            } else {
     549                puts stderr "WARNING: name \"$name\" in sentence layout \"$itk_option(-layout)\" not recognized"
     550            }
     551
     552            set str [string range $str [expr {$s1+1}] end]
     553        }
     554
     555        # create a label for any trailing string
     556        set str [string trim $str]
     557        if {$str ne ""} {
     558            set lname $_frame.sentence[incr n]
     559            label $lname -text $str -font $font
     560            lappend _sentenceparts(all) $lname
     561            lappend _sentenceparts(fragments) $lname
     562        }
     563    }
     564
     565    switch -glob -- $_scheme {
    507566      tabs {
    508567        #
     
    511570        #
    512571
    513         # use inner frame within tabs to show current group
    514         pack $_tabs -before $_frame -fill x
     572        # stop covering up the tabset and put the _frame inside the tabs
     573        pack forget $_frame
     574        $_tabs configure -width 0 -height 0
    515575
    516576        set gn 1
     
    525585            set _name2info($name-label) $label
    526586            $_tabs insert end $name -text $label \
    527                 -activebackground $itk_option(-background)
     587                -activebackground $itk_option(-background) \
     588                -window $_frame -fill both
    528589
    529590            incr gn
     
    534595        $_dispatcher event -now !resize
    535596
    536         grid propagate $_frame off
    537597        grid columnconfigure $_frame 0 -weight 1
    538598        grid rowconfigure $_frame 0 -weight 1
     
    541601      }
    542602
    543       hlabels {
     603      vertical {
    544604        #
    545         # SCHEME: hlabels
     605        # SCHEME: vertical
    546606        # simple "Label: Value" layout
    547607        #
    548         pack forget $_tabs
    549         grid propagate $_frame on
    550         grid columnconfigure $_frame 0 -weight 0
    551         grid rowconfigure $_frame 0 -weight 0
     608        if {[$_tabs size] > 0} {
     609            $_tabs delete 0 end
     610        }
     611        pack $_frame -expand yes -fill both
     612        $_tabs configure -width [winfo reqwidth $_frame] \
     613            -height [winfo reqheight $_frame]
    552614
    553615        set expand 0  ;# most controls float to top
     
    560622
    561623            set wv $_name2info($name-value)
    562             if {$wv != "" && [winfo exists $wv]} {
     624            if {$wv ne "" && [winfo exists $wv]} {
    563625                if {$wl != ""} {
    564626                    grid $wv -row $row -column 1 -sticky ew
     
    614676                }
    615677                grid columnconfigure $_frame 1 -weight 1
    616             } elseif {$wv == "--"} {
    617                 grid rowconfigure $_frame $row -minsize 10
    618678            }
    619679
     
    636696        }
    637697      }
     698
     699      horizontal {
     700        #
     701        # SCHEME: horizontal
     702        # lay out left to right
     703        #
     704        if {[$_tabs size] > 0} {
     705            $_tabs delete 0 end
     706        }
     707        pack $_frame -expand yes -fill both
     708        $_tabs configure -width [winfo reqwidth $_frame] \
     709            -height [winfo reqheight $_frame]
     710
     711        set col 0
     712        set pad [expr {$itk_option(-padding)/2}]
     713        foreach name $showing {
     714            set wl $_name2info($name-label)
     715            if {$wl != "" && [winfo exists $wl]} {
     716                grid $wl -row 0 -column $col -sticky e -padx $pad
     717                incr col
     718            }
     719
     720            set wv $_name2info($name-value)
     721            if {$wv != "" && [winfo exists $wv]} {
     722                grid $wv -row 0 -column $col -sticky ew -padx $pad
     723                grid columnconfigure $_frame $col -weight 0
     724                incr col
     725            }
     726        }
     727      }
     728
     729      sentence:* {
     730        #
     731        # SCHEME: sentence
     732        # lay out left to right with sentence parts: "( [x] , [y] )"
     733        #
     734        if {[$_tabs size] > 0} {
     735            $_tabs delete 0 end
     736        }
     737        pack $_frame -expand yes -fill both
     738        $_tabs configure -width [winfo reqwidth $_frame] \
     739            -height [winfo reqheight $_frame]
     740
     741        set col 0
     742        set pad [expr {$itk_option(-padding)/2}]
     743        foreach widget $_sentenceparts(all) {
     744            grid $widget -row 0 -column $col -padx $pad
     745            incr col
     746        }
     747      }
    638748    }
    639749}
     
    650760    set tag "Controls-$this"
    651761    set wv $_name2info($name-value)
    652     if {$wv == "--" || [catch {bindtags $wv} btags]} {
     762    if {[catch {bindtags $wv} btags]} {
    653763        return
    654764    }
     
    735845
    736846        set wv $_name2info($name-value)
    737         grid $wv -row 0 -column 0 -sticky new
     847        grid $wv -row 0 -column 0 -sticky nsew
     848
     849        $_tabs tab configure [$_tabs get $i] -window $_frame
    738850
    739851        if {$why eq "-user"} {
     
    749861# ----------------------------------------------------------------------
    750862itcl::body Rappture::Controls::_resize {} {
    751     switch -- $_scheme {
     863    switch -glob -- $_scheme {
    752864        tabs {
    753             # compute the overall size
    754             # BE CAREFUL: do this after setting "-heading no" above
     865            # in "tabs" mode, the overall size is the largest for all pages
    755866            set maxw 0
    756867            set maxh 0
     
    763874                if {$h > $maxh} { set maxh $h }
    764875            }
     876
     877            grid propagate $_frame no
    765878            $_frame configure -width $maxw -height $maxh
    766879        }
    767         hlabels {
    768             # do nothing
     880        vertical - horizontal - sentence* {
     881            # in other modes, just use normal size propagation
     882            grid propagate $_frame yes
     883        }
     884        default {
     885            error "bad layout scheme \"$_scheme\""
    769886        }
    770887    }
     
    777894    $_dispatcher event -idle !layout
    778895}
     896
     897# ----------------------------------------------------------------------
     898# OPTION: -layout
     899# ----------------------------------------------------------------------
     900itcl::configbody Rappture::Controls::layout {
     901    # clear any existing sentence parts
     902    if {[array size _sentenceparts] > 0} {
     903        foreach part $_sentenceparts(fragments) {
     904            destroy $part
     905        }
     906        catch {unset _sentenceparts}
     907    }
     908
     909    if {![regexp {^(|horizontal|vertical|tabs|sentence:.+)$} $itk_option(-layout)]} {
     910        puts "ERROR: bad layout option \"$itk_option(-layout)\" -- should be horizontal, vertical, tabs or sentence:..."
     911        set itk_option(-layout) ""
     912    }
     913
     914    # recompute the layout at some point
     915    $_dispatcher event -idle !layout
     916}
  • trunk/gui/scripts/gauge.tcl

    r3510 r3642  
    2020option add *Gauge.sampleWidth 30 widgetDefault
    2121option add *Gauge.sampleHeight 20 widgetDefault
     22option add *Gauge.borderWidth 2 widgetDefault
     23option add *Gauge.relief sunken widgetDefault
    2224option add *Gauge.valuePosition "right" widgetDefault
    2325option add *Gauge.textBackground #cccccc widgetDefault
     
    5759    private variable _value 0  ;# value for this widget
    5860
    59     blt::bitmap define GaugeArrow-up {
    60         #define up_width 8
    61         #define up_height 4
    62         static unsigned char up_bits[] = {
    63            0x10, 0x38, 0x7c, 0xfe};
    64     }
    65     blt::bitmap define GaugeArrow-down {
    66         #define arrow_width 8
    67         #define arrow_height 4
    68         static unsigned char arrow_bits[] = {
    69            0xfe, 0x7c, 0x38, 0x10};
    70     }
    71 
    7261    blt::bitmap define GaugeArrow {
    7362        #define arrow_width 9
     
    8776# ----------------------------------------------------------------------
    8877itcl::body Rappture::Gauge::constructor {args} {
     78    itk_option remove hull.borderwidth hull.relief
     79    component hull configure -borderwidth 0
     80
    8981    itk_component add icon {
    9082        canvas $itk_interior.icon -width 1 -height 1 \
     
    9385        usual
    9486        ignore -highlightthickness -highlightbackground -highlightcolor
    95     }
    96     pack $itk_component(icon) -side left
     87        ignore -borderwidth -relief
     88    }
    9789    bind $itk_component(icon) <Configure> [itcl::code $this _redraw]
    9890
    9991    itk_component add -protected vframe {
    10092        frame $itk_interior.vframe
     93    } {
     94        keep -borderwidth -relief
    10195    }
    10296
    10397    itk_component add value {
    104         label $itk_component(vframe).value -borderwidth 1 -width 7 \
    105             -textvariable [itcl::scope _value]
     98        label $itk_component(vframe).value -width 7 \
     99            -borderwidth 1 -relief flat -textvariable [itcl::scope _value]
    106100    } {
    107101        rename -background -textbackground textBackground Background
     
    146140
    147141    itk_component add spinup {
    148         button $itk_component(spinner).up -bitmap GaugeArrow-up \
     142        button $itk_component(spinner).up -image [Rappture::icon intplus] \
    149143            -borderwidth 1 -relief raised -highlightthickness 0 \
    150144            -command [itcl::code $this bump 1]
     
    152146        usual
    153147        ignore -borderwidth -highlightthickness
    154     }
    155     pack $itk_component(spinup) -side top -expand yes -fill both
     148        rename -background -buttonbackground buttonBackground Background
     149    }
     150    pack $itk_component(spinup) -side left -expand yes -fill both
    156151
    157152    itk_component add spindn {
    158         button $itk_component(spinner).down -bitmap GaugeArrow-down \
     153        button $itk_component(spinner).down -image [Rappture::icon intminus] \
    159154            -borderwidth 1 -relief raised -highlightthickness 0 \
    160155            -command [itcl::code $this bump -1]
     
    162157        usual
    163158        ignore -borderwidth -highlightthickness
    164     }
    165     pack $itk_component(spindn) -side bottom -expand yes -fill both
     159        rename -background -buttonbackground buttonBackground Background
     160    }
     161    pack $itk_component(spindn) -side right -expand yes -fill both
    166162
    167163
    168164    itk_component add presets {
    169165        button $itk_component(vframe).psbtn -bitmap GaugeArrow \
    170             -borderwidth 1 -highlightthickness 0 -relief flat
     166            -borderwidth 1 -highlightthickness 0 -relief raised
    171167    } {
    172168        usual
    173169        ignore -borderwidth -relief -highlightthickness
    174         rename -background -textbackground textBackground Background
    175170    }
    176171
     
    470465        $itk_component($comp) configure -relief solid
    471466    } else {
    472         $itk_component($comp) configure -relief flat
     467        if {$comp eq "presets"} {
     468            $itk_component($comp) configure -relief raised
     469        } else {
     470            $itk_component($comp) configure -relief flat
     471        }
    473472    }
    474473}
     
    560559        }
    561560        unpost {
    562             $itk_component(presets) configure -relief flat
     561            $itk_component(presets) configure -relief raised
    563562        }
    564563        select {
     
    600599
    601600    if {"" != $itk_option(-image) || "" != $itk_option(-spectrum)} {
    602         pack $itk_component(icon) -side $pos
     601        pack $itk_component(icon) -side $pos -padx 2
    603602    }
    604603}
  • trunk/gui/scripts/htmlviewer.tcl

    r3330 r3642  
    277277        background: $itk_option(-background);
    278278        color: $itk_option(-foreground);
    279         font: 10px helvetica,arial;
     279        font: 12px helvetica,arial;
    280280      }
    281281      a {
  • trunk/gui/scripts/page.tcl

    r3636 r3642  
    192192            # create a control panel, if necessary
    193193            if {![winfo exists $frame.cntls]} {
    194                 Rappture::Controls $frame.cntls $_owner
     194                Rappture::Controls $frame.cntls $_owner \
     195                    -layout [$xmlobj get $path.about.layout]
    195196                pack $frame.cntls -expand yes -fill both -pady 4
    196197            }
  • trunk/gui/scripts/pager.tcl

    r3636 r3642  
    490490        pages {
    491491            pack forget $itk_component(inside)
    492             pack $itk_component(controls) -side bottom -fill x -padx 32 -pady 8
     492            pack $itk_component(controls) -side bottom -fill x -padx 60 -pady 8
    493493            pack $itk_component(breadcrumbarea) -side top -fill x
    494494            pack $itk_component(line) -side top -fill x
  • trunk/gui/scripts/scroller.tcl

    r3330 r3642  
    341341        grid propagate $itk_component(hull) yes
    342342        if {$_frame == "$itk_component(hull).ifr"} {
    343             set w [winfo reqwidth $_frame.f]
     343            set w [expr {[winfo reqwidth $_frame.f]+2}]
    344344            set h [winfo reqheight $_frame.f]
    345345            $_frame configure -width $w -height $h
  • trunk/gui/scripts/spinint.tcl

    r3454 r3642  
    1818option add *Spinint.width 5 widgetDefault
    1919option add *Spinint.textBackground white widgetDefault
    20 
    21 blt::bitmap define Spinint-up {
    22 #define up_width 8
    23 #define up_height 4
    24 static unsigned char up_bits[] = {
    25    0x10, 0x38, 0x7c, 0xfe};
    26 }
    27 
    28 blt::bitmap define Spinint-down {
    29 #define arrow_width 8
    30 #define arrow_height 4
    31 static unsigned char arrow_bits[] = {
    32    0xfe, 0x7c, 0x38, 0x10};
    33 }
    3420
    3521itcl::class Rappture::Spinint {
     
    8268
    8369    itk_component add up {
    84         button $itk_component(controls).spinup -bitmap Spinint-up \
     70        button $itk_component(controls).spinup \
     71            -image [Rappture::icon intplus] \
    8572            -borderwidth 1 -relief raised -highlightthickness 0 \
    8673            -command [itcl::code $this bump up]
     
    8875        usual
    8976        ignore -borderwidth -highlightthickness
     77        rename -background -buttonbackground buttonBackground Background
    9078    }
    91     pack $itk_component(up) -side top -expand yes -fill both
     79    pack $itk_component(up) -side left -expand yes -fill both
    9280
    9381    itk_component add down {
    94         button $itk_component(controls).spindn -bitmap Spinint-down \
     82        button $itk_component(controls).spindn \
     83            -image [Rappture::icon intminus] \
    9584            -borderwidth 1 -relief raised -highlightthickness 0 \
    9685            -command [itcl::code $this bump down]
     
    9887        usual
    9988        ignore -borderwidth -highlightthickness
     89        rename -background -buttonbackground buttonBackground Background
    10090    }
    101     pack $itk_component(down) -side bottom -expand yes -fill both
     91    pack $itk_component(down) -side right -expand yes -fill both
    10292
    10393    eval itk_initialize $args
  • trunk/gui/scripts/switch.tcl

    r3510 r3642  
    4141
    4242    itk_component add button {
    43         button $itk_interior.value \
    44             -compound left \
     43        button $itk_interior.value -compound left \
    4544            -overrelief flat -relief flat -padx 3 -pady 0 -bd 0 \
    4645            -command [itcl::code $this _toggle]
     
    114113    if { $_value } {
    115114        if {$itk_option(-showimage)} {
    116             set image [Rappture::icon cbon]
     115            set image [Rappture::icon switch1]
    117116        }
    118117        if {$itk_option(-showtext)} {
     
    121120    } else {
    122121        if {$itk_option(-showimage)} {
    123             set image [Rappture::icon cboff]
     122            set image [Rappture::icon switch0]
    124123        }
    125124        if {$itk_option(-showtext)} {
  • trunk/gui/scripts/tempgauge.tcl

    r3330 r3642  
    1616option add *TemperatureGauge.sampleWidth 30 widgetDefault
    1717option add *TemperatureGauge.sampleHeight 20 widgetDefault
     18option add *TemperatureGauge.borderWidth 2 widgetDefault
     19option add *TemperatureGauge.relief sunken widgetDefault
    1820option add *TemperatureGauge.textBackground #cccccc widgetDefault
    1921option add *TemperatureGauge.valuePosition "right" widgetDefault
Note: See TracChangeset for help on using the changeset viewer.