Ignore:
Timestamp:
Apr 12, 2009, 11:35:49 AM (15 years ago)
Author:
mmc
Message:

Final touches on the sidebar:

  • click tabs to open/close
  • added tooltips to tabs
  • fixed highlight thickness for buttons in control area
  • added padding above first control button
  • snap to close when sidebar is too small
  • sidebar never resize sash never gets lost when window is sized smaller
  • new icons for volume & cutplane in nanovis sidebar
  • added "show volume" control to volume options in nanovis sidebar
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/scripts/nanovisviewer.tcl

    r1390 r1391  
    201201    itk_component add reset {
    202202        button $f.reset -borderwidth 1 -padx 1 -pady 1 \
     203            -highlightthickness 0 \
    203204            -image [Rappture::icon reset-view] \
    204205            -command [itcl::code $this Zoom reset]
     206    } {
     207        usual
     208        ignore -highlightthickness
    205209    }
    206210    pack $itk_component(reset) -side top -padx 2 -pady 2
     
    209213    itk_component add zoomin {
    210214        button $f.zin -borderwidth 1 -padx 1 -pady 1 \
     215            -highlightthickness 0 \
    211216            -image [Rappture::icon zoom-in] \
    212217            -command [itcl::code $this Zoom in]
     218    } {
     219        usual
     220        ignore -highlightthickness
    213221    }
    214222    pack $itk_component(zoomin) -side top -padx 2 -pady 2
     
    217225    itk_component add zoomout {
    218226        button $f.zout -borderwidth 1 -padx 1 -pady 1 \
     227            -highlightthickness 0 \
    219228            -image [Rappture::icon zoom-out] \
    220229            -command [itcl::code $this Zoom out]
     230    } {
     231        usual
     232        ignore -highlightthickness
    221233    }
    222234    pack $itk_component(zoomout) -side top -padx 2 -pady 2
     
    227239    #
    228240    itk_component add volume {
    229         label $f.volume -borderwidth 1 -relief sunken -padx 1 -pady 1 \
    230             -text "Volume" \
    231             -image [Rappture::icon playback-record]
     241        label $f.volume -borderwidth 1 -relief sunken \
     242            -image [Rappture::icon volume-on]
    232243    }
    233244    bind $itk_component(volume) <ButtonPress> \
     
    235246    Rappture::Tooltip::for $itk_component(volume) \
    236247        "Toggle the volume cloud on/off"
    237     pack $itk_component(volume) -padx 2 -pady 2
     248    pack $itk_component(volume) -ipadx 1 -ipady 1 -padx 2 -pady 2
    238249
    239250    BuildViewTab
     
    16681679    set inner [$itk_component(main) insert end \
    16691680        -title "Volume Settings" \
    1670         -icon [Rappture::icon playback-record]]
     1681        -icon [Rappture::icon volume-on]]
    16711682    $inner configure -borderwidth 4
    16721683
    16731684    set fg [option get $itk_component(hull) font Font]
    16741685    #set bfg [option get $itk_component(hull) boldFont Font]
     1686
     1687    checkbutton $inner.vol -text "Show volume" -font $fg \
     1688        -variable [itcl::scope settings_($this-volume)] \
     1689        -command [itcl::code $this FixSettings volume]
     1690    label $inner.shading -text "Shading:" -font $fg
    16751691
    16761692    label $inner.dim -text "Dim" -font $fg
     
    17031719
    17041720    blt::table $inner \
    1705         0,0 $inner.dim  -anchor e -pady 2 \
    1706         0,1 $inner.light -columnspan 2 -pady 2 -fill x \
    1707         0,3 $inner.bright -anchor w -pady 2 \
    1708         1,0 $inner.fog -anchor e -pady 2 \
    1709         1,1 $inner.transp -columnspan 2 -pady 2 -fill x \
    1710         1,3 $inner.plastic -anchor w -pady 2 \
    1711         2,0 $inner.clear -anchor e -pady 2 \
    1712         2,1 $inner.opacity -columnspan 2 -pady 2 -fill x\
    1713         2,3 $inner.opaque -anchor w -pady 2 \
    1714         3,0 $inner.thin -anchor e -pady 2 \
    1715         3,1 $inner.thickness -columnspan 2 -pady 2 -fill x\
    1716         3,3 $inner.thick -anchor w -pady 2
     1721        0,0 $inner.vol -columnspan 4 -anchor w -pady 2 \
     1722        1,0 $inner.shading -columnspan 4 -anchor w -pady {10 2} \
     1723        2,0 $inner.dim -anchor e -pady 2 \
     1724        2,1 $inner.light -columnspan 2 -pady 2 -fill x \
     1725        2,3 $inner.bright -anchor w -pady 2 \
     1726        3,0 $inner.fog -anchor e -pady 2 \
     1727        3,1 $inner.transp -columnspan 2 -pady 2 -fill x \
     1728        3,3 $inner.plastic -anchor w -pady 2 \
     1729        4,0 $inner.clear -anchor e -pady 2 \
     1730        4,1 $inner.opacity -columnspan 2 -pady 2 -fill x\
     1731        4,3 $inner.opaque -anchor w -pady 2 \
     1732        5,0 $inner.thin -anchor e -pady 2 \
     1733        5,1 $inner.thickness -columnspan 2 -pady 2 -fill x\
     1734        5,3 $inner.thick -anchor w -pady 2
    17171735
    17181736    blt::table configure $inner c0 c1 c3 r* -resize none
    1719     blt::table configure $inner r4 -resize expand
     1737    blt::table configure $inner r6 -resize expand
    17201738}
    17211739
     
    19351953            if {$op} {
    19361954                SendCmd "volume data state on [CurrentVolumeIds]"
    1937                 $itk_component(volume) configure -relief sunken
     1955                $itk_component(volume) configure -relief sunken \
     1956                    -image [Rappture::icon volume-on]
    19381957                set settings_($this-volume) 1
    19391958            } else {
    19401959                SendCmd "volume data state off [CurrentVolumeIds]"
    1941                 $itk_component(volume) configure -relief raised
     1960                $itk_component(volume) configure -relief raised \
     1961                    -image [Rappture::icon volume-off]
    19421962                set settings_($this-volume) 0
    19431963            }
Note: See TracChangeset for help on using the changeset viewer.