Changeset 5562 for trunk


Ignore:
Timestamp:
May 19, 2015, 11:52:47 AM (9 years ago)
Author:
ldelgass
Message:

Add title to flowvis legend, fix legend text tags for settings text color

Location:
trunk/gui/scripts
Files:
4 edited

Legend:

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

    r5541 r5562  
    10001000            -image $_image(legend) -tags colorbar
    10011001        $c create text $lx $ly -anchor sw \
    1002             -fill $itk_option(-plotforeground) -tags "limits labels vmin"
     1002            -fill $itk_option(-plotforeground) -tags "limits text vmin"
    10031003        $c create text [expr {$w-$lx}] $ly -anchor se \
    1004             -fill $itk_option(-plotforeground) -tags "limits labels vmax"
     1004            -fill $itk_option(-plotforeground) -tags "limits text vmax"
     1005        $c create text [expr {$w/2}] $ly -anchor s \
     1006            -fill $itk_option(-plotforeground) -tags "title text"
    10051007        $c lower colorbar
    10061008        $c bind colorbar <ButtonRelease-1> [itcl::code $this AddIsoMarker %x %y]
     
    10151017    $c itemconfigure vmax -text [format %g $max]
    10161018    $c coords vmax [expr {$w-$lx}] $ly
     1019
     1020    set title [$_first hints label]
     1021    set units [$_first hints units]
     1022    if { $units != "" } {
     1023        set title "$title ($units)"
     1024    }
     1025    $c itemconfigure title -text $title
     1026    $c coords title [expr {$w/2}] $ly
    10171027
    10181028    if { [info exists _isomarkers($tf)] } {
     
    17961806        SendCmd "grid axiscolor $rgb"
    17971807        SendCmd "grid linecolor $rgb"
    1798         $itk_component(legend) itemconfigure labels -fill $color
    1799         $itk_component(legend) itemconfigure limits -fill $color
     1808        $itk_component(legend) itemconfigure text -fill $color
    18001809    }
    18011810}
  • trunk/gui/scripts/isomarker.tcl

    r5259 r5562  
    5656    set _label [$c create text 0 $h \
    5757                    -anchor n -fill white -font "Helvetica 8" \
    58                     -tags "labels $this $obj" -state hidden]
     58                    -tags "labels text $this $obj" -state hidden]
    5959    $c bind $_tick <Enter>           [itcl::code $this EnterTick]
    6060    $c bind $_tick <Leave>           [itcl::code $this LeaveTick]
  • trunk/gui/scripts/nanovisviewer.tcl

    r5527 r5562  
    769769            -fill $itk_option(-plotforeground) -tags "limits text vmax"
    770770        $c create text [expr {$w/2}] $ly -anchor s \
    771             -fill $itk_option(-plotforeground) -tags "limits text title"
     771            -fill $itk_option(-plotforeground) -tags "title text"
    772772        $c lower colorbar
    773773        $c bind colorbar <ButtonRelease-1> [itcl::code $this AddNewMarker %x %y]
     
    15231523        SendCmd "grid axiscolor $rgb"
    15241524        SendCmd "grid linecolor $rgb"
    1525         $itk_component(legend) itemconfigure labels -fill $color
    1526         $itk_component(legend) itemconfigure limits -fill $color
     1525        $itk_component(legend) itemconfigure text -fill $color
    15271526    }
    15281527}
  • trunk/gui/scripts/transferfunctioneditor.tcl

    r5141 r5562  
    127127    set _labels($name) [$_canvas create text 0 $h \
    128128                            -anchor n -fill white -font "Helvetica 8" \
    129                             -tags "labels $this $_name" -state $state]
     129                            -tags "labels text $this $_name" -state $state]
    130130    set _id2name($_ticks($name)) $name
    131131    $_canvas bind $_ticks($name) <Enter> [itcl::code $this EnterTick $name]
Note: See TracChangeset for help on using the changeset viewer.