Ignore:
Timestamp:
Apr 21, 2015 11:03:47 PM (9 years ago)
Author:
ldelgass
Message:

Bring volume settings tab look in line with trunk. Also, disable application
of volume component opacity style setting, since some tools erronenously set
this to 1.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.4/gui/scripts/nanovisviewer.tcl

    r5283 r5288  
    16441644    #set bfg [option get $itk_component(hull) boldFont Font]
    16451645
    1646     label $inner.shading -text "Shading:" -font $fg
     1646    label $inner.lighting_l \
     1647        -text "Lighting / Material Properties" \
     1648        -font "Arial 9 bold"
    16471649
    16481650    checkbutton $inner.light2side -text "Two-sided lighting" -font $fg \
     
    16571659    ::scale $inner.light -from 0 -to 100 -orient horizontal \
    16581660        -variable [itcl::scope _settings(-light)] \
    1659         -width 10 \
    1660         -showvalue off -command [itcl::code $this AdjustSetting -light]
     1661        -showvalue off -command [itcl::code $this AdjustSetting -light] \
     1662        -troughcolor grey92
    16611663    label $inner.bright -text "Surface" -font $fg
    16621664
    16631665    # Opacity
    1664     label $inner.fog -text "Clear" -font $fg
    1665     ::scale $inner.transp -from 0 -to 100 -orient horizontal \
     1666    label $inner.opacity_l -text "Opacity" -font $fg
     1667    ::scale $inner.opacity -from 0 -to 100 -orient horizontal \
    16661668        -variable [itcl::scope _widget(-volumeopacity)] \
    1667         -width 10 \
    1668         -showvalue off -command [itcl::code $this AdjustSetting -volumeopacity]
    1669     label $inner.plastic -text "Opaque" -font $fg
     1669        -showvalue off \
     1670        -command [itcl::code $this AdjustSetting -volumeopacity] \
     1671        -troughcolor grey92
     1672
     1673    label $inner.transferfunction_l \
     1674        -text "Transfer Function" -font "Arial 9 bold"
    16701675
    16711676    # Tooth thickness
     
    16731678    ::scale $inner.thickness -from 0 -to 1000 -orient horizontal \
    16741679        -variable [itcl::scope _settings(-thickness)] \
    1675         -width 10 \
    1676         -showvalue off -command [itcl::code $this AdjustSetting -thickness]
     1680        -showvalue off -command [itcl::code $this AdjustSetting -thickness] \
     1681        -troughcolor grey92
    16771682    label $inner.thick -text "Thick" -font $fg
    16781683
     
    17001705        0,0 $inner.volcomponents_l -anchor e -cspan 2 \
    17011706        0,2 $inner.volcomponents             -cspan 3 -fill x \
    1702         1,0 $inner.shading -cspan 4 -anchor w -pady {10 2} \
    1703         2,0 $inner.light2side -cspan 4 -anchor w -pady 2 \
    1704         3,0 $inner.visibility -cspan 4 -anchor w -pady 2 \
    1705         4,0 $inner.dim -anchor e -pady 2 \
    1706         4,1 $inner.light -cspan 2 -pady 2 -fill x \
    1707         4,3 $inner.bright -anchor w -pady 2 \
    1708         5,0 $inner.fog -anchor e -pady 2 \
    1709         5,1 $inner.transp -cspan 2 -pady 2 -fill x \
    1710         5,3 $inner.plastic -anchor w -pady 2 \
    1711         6,0 $inner.thin -anchor e -pady 2 \
    1712         6,1 $inner.thickness -cspan 2 -pady 2 -fill x\
    1713         6,3 $inner.thick -anchor w -pady 2
    1714 
    1715     blt::table configure $inner c0 c1 c3 r* -resize none
    1716     blt::table configure $inner r7 -resize expand
     1707        1,1 $inner.lighting_l -anchor w -cspan 4 \
     1708        2,1 $inner.dim -anchor e \
     1709        2,2 $inner.light -cspan 2 -fill x \
     1710        2,4 $inner.bright -anchor w \
     1711        3,1 $inner.light2side -cspan 3 -anchor w \
     1712        4,1 $inner.visibility -cspan 3 -anchor w \
     1713        5,1 $inner.transferfunction_l -cspan 4 -anchor w \
     1714        6,1 $inner.opacity_l -anchor e -pady 2 \
     1715        6,2 $inner.opacity -cspan 3 -fill x \
     1716        7,1 $inner.colormap_l -anchor e \
     1717        7,2 $inner.colormap -padx 2 -cspan 3 -fill x \
     1718        8,1 $inner.thin -anchor e \
     1719        8,2 $inner.thickness -cspan 2 -fill x \
     1720        8,4 $inner.thick -anchor w
     1721
     1722    blt::table configure $inner c* r* -resize none
     1723    blt::table configure $inner r* -pady { 2 0 }
     1724    blt::table configure $inner c2 c3 r9 -resize expand
     1725    blt::table configure $inner c0 -width .1i
    17171726}
    17181727
     
    22552264    }
    22562265    array set style [lindex [$dataobj components -style $cname] 0]
     2266    # Some tools erroneously set -opacity to 1 in style, so
     2267    # override the requested opacity for now
     2268    set style(-opacity) 0.5
    22572269    set _settings($cname-volumeopacity) $style(-opacity)
    22582270    set tag $dataobj-$cname
Note: See TracChangeset for help on using the changeset viewer.