Changeset 6545 for trunk


Ignore:
Timestamp:
Sep 15, 2016, 12:22:29 PM (8 years ago)
Author:
ldelgass
Message:

Layout fix for layer legend

File:
1 edited

Legend:

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

    r6530 r6545  
    21432143        2,0 $inner.wireframe -cspan 2 -anchor w -pady 2 \
    21442144        3,0 $inner.lighting  -cspan 2 -anchor w -pady 2 \
    2145         4,0 $inner.time_l    -cspan 2 -anchor w -pady 2 \
    2146         4,1 $inner.time      -cspan 2 -fill x   -pady 2 \
    2147         5,0 $inner.ambient_l -cspan 2 -anchor w -pady 2 \
    2148         5,1 $inner.ambient   -cspan 2 -fill x   -pady 2
     2145        4,0 $inner.time_l            -anchor w -pady 2 \
     2146        4,1 $inner.time              -fill x   -pady 2 \
     2147        5,0 $inner.ambient_l         -anchor w -pady 2 \
     2148        5,1 $inner.ambient           -fill x   -pady 2
    21492149#        4,0 $inner.edges     -cspan 2  -anchor w -pady 2
    21502150
     
    33153315                    -text $info(label) \
    33163316                    -font "Arial 9" -anchor w
    3317                 blt::table $f $row,1 $f.${ctlname}_lbl -anchor w -pady 2 -cspan 2
     3317                blt::table $f $row,1 $f.${ctlname}_lbl -anchor w -pady 2
    33183318                Rappture::Tooltip::for $f.${ctlname}_lbl [join $tooltip \n]
    33193319            } else {
     
    33243324                    -command [itcl::code $this \
    33253325                                  SetLayerVisibility $dataobj $layer]
    3326                 blt::table $f $row,1 $f.${ctlname}_visible -anchor w -pady 2 -cspan 2
     3326                blt::table $f $row,1 $f.${ctlname}_visible -anchor w -pady 2
    33273327                Rappture::Tooltip::for $f.${ctlname}_visible [join $tooltip \n]
    33283328            }
     
    33313331                incr imgIdx
    33323332                if { $info(driver) == "colorramp" } {
     3333                    set f2 $f.cmap
     3334                    frame $f2
    33333335                    set colormap $ctlname
    33343336                    if { ![info exists _image(legend-$colormap)] } {
     
    33363338                    }
    33373339                    itk_component add legend-$colormap-min {
    3338                         label $f.legend-$colormap-min -text 0
     3340                        label $f2.legend-$colormap-min -text 0
    33393341                    }
    33403342                    itk_component add legend-$colormap-max {
    3341                         label $f.legend-$colormap-max -text 1
     3343                        label $f2.legend-$colormap-max -text 1
    33423344                    }
    33433345                    itk_component add legend-$colormap {
    3344                         label $f.legend-$colormap -image $_image(legend-$colormap)
    3345                     }
    3346                     blt::table $f $row,0 $f.legend-$colormap-min -anchor w -pady 0 -cspan 2
    3347                     blt::table $f $row,2 $f.legend-$colormap-max -anchor e -pady 0
    3348                     incr row
    3349                     blt::table $f $row,0 $f.legend-$colormap -anchor w -pady 2 -cspan 3
     3346                        label $f2.legend-$colormap -image $_image(legend-$colormap)
     3347                    }
     3348                    blt::table $f2 $row,0 $f2.legend-$colormap-min -anchor w -pady 0
     3349                    blt::table $f2 $row,1 $f2.legend-$colormap-max -anchor e -pady 0
     3350                    blt::table $f2 $row,0 $f2.legend-$colormap -anchor w -pady 2 -cspan 2
     3351
     3352                    blt::table $f $row,0 $f2 -anchor w -pady 0 -cspan 2
    33503353                    incr row
    33513354                    RequestLegend $colormap 256 16
     
    33553358                 $info(type) != "mask" &&
    33563359                ($info(type) != "image" || $imgIdx > 1) } {
    3357                 label $f.${ctlname}_opacity_l -text "Opacity" -font "Arial 9"
    3358                 ::scale $f.${ctlname}_opacity -from 0 -to 100 \
     3360                set f2 $f.op
     3361                frame $f2
     3362                label $f2.${ctlname}_opacity_l -text "Opacity" -font "Arial 9"
     3363                ::scale $f2.${ctlname}_opacity -from 0 -to 100 \
    33593364                    -orient horizontal -showvalue off \
    33603365                    -variable [itcl::scope _opacity($tag)] \
     
    33623367                    -command [itcl::code $this \
    33633368                                  SetLayerOpacity $dataobj $layer]
    3364                 Rappture::Tooltip::for $f.${ctlname}_opacity "Set opacity of $info(label) layer"
    3365                 blt::table $f $row,0 $f.${ctlname}_opacity_l -anchor w -pady 2 -cspan 2
    3366                 blt::table $f $row,2 $f.${ctlname}_opacity -anchor w -pady 2
     3369                Rappture::Tooltip::for $f2.${ctlname}_opacity "Set opacity of $info(label) layer"
     3370                blt::table $f2 $row,0 $f2.${ctlname}_opacity_l -anchor w -pady 2
     3371                blt::table $f2 $row,1 $f2.${ctlname}_opacity -anchor w -pady 2
     3372
     3373                blt::table $f $row,0 $f2 -anchor w -pady 0 -cspan 2
    33673374                incr row
    33683375            }
     
    33753382    SendCmd "[list map attrib [encoding convertto utf-8 [join $attrib ,]]]"
    33763383    label $f.map_attrib -text [join $attrib \n] -font "Arial 9"
    3377     blt::table $f $row,0 $f.map_attrib -anchor sw -pady 2 -cspan 3
     3384    blt::table $f $row,0 $f.map_attrib -anchor sw -pady 2 -cspan 2
    33783385    #incr row
    33793386    if { $row > 0 } {
    33803387        blt::table configure $f r* c* -resize none
    3381         blt::table configure $f r$row c2 -resize expand
     3388        blt::table configure $f r$row c1 -resize expand
    33823389    }
    33833390}
Note: See TracChangeset for help on using the changeset viewer.