Ignore:
Timestamp:
Oct 29, 2009, 7:21:56 AM (15 years ago)
Author:
gah
Message:
 
File:
1 edited

Legend:

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

    r1599 r1601  
    1919option add *XyPrint.dimColor gray widgetDefault
    2020option add *XyPrint.controlBackground gray widgetDefault
    21 option add *XyPrint*font "Arial 10"
     21option add *XyPrint*font "Arial 9"
    2222option add *XyPrint*Entry*width "6" widgetDefault
    2323option add *XyPrint*Entry*background "white" widgetDefault
     
    7676    private method restore { toolName plotName data }
    7777    private common _settings
     78    private common _fonts
    7879    private common _wait
    7980}
     
    110111    }
    111112    itk_component add ok {
    112         button $itk_interior.ok -text "Print" \
     113        button $itk_interior.ok -text "Save" \
    113114            -highlightthickness 0 \
    114115            -command [itcl::code $this Done 1] \
     
    538539        5,3 $page.bottom -fill x 
    539540
    540     blt::table configure $page r* -resize none
     541    blt::table configure $page r* -resize none -pady { 0 2 }
    541542    blt::table configure $page r2 -resize both
    542543    blt::table configure $page c2 c4 -width .5i
     
    579580        3,1 $page.style -fill x \
    580581        5,0 $page.remember -cspan 2 -anchor w
    581     blt::table configure $page r* -resize none
     582    blt::table configure $page r* -resize none  -pady { 0 2 }
    582583    blt::table configure $page r4 -resize both
    583584
     
    706707        "symbol"  "Symbol" \
    707708        "times"  "Times"         
    708     bind $page.fontfamily <KeyPress-Return> \
    709         [itcl::code $this ApplyLegendSettings]
     709    bind $page.fontfamily <<Value>> [itcl::code $this ApplyLegendSettings]
    710710
    711711    Rappture::Combobox $page.fontsize -width 4 -editable no
    712712    $page.fontsize choices insert end \
    713713        "8" "8" \
     714        "9" "9" \
    714715        "10" "10" \
    715716        "11" "11" \
     
    719720        "18" "18" \
    720721        "20" "20"
    721     bind  $page.fontsize <KeyPress-Return> \
    722         [itcl::code $this ApplyLegendSettings]
     722    bind  $page.fontsize <<Value>> [itcl::code $this ApplyLegendSettings]
    723723
    724724    Rappture::PushButton $page.fontbold \
    725         -width 26 -height 26 \
     725        -width 18 -height 18 \
    726726        -onimage [Rappture::icon font-bold] \
    727727        -offimage [Rappture::icon font-bold] \
     
    730730
    731731    Rappture::PushButton $page.fontitalic \
    732         -width 26 -height 26 \
     732        -width 18 -height 18 \
    733733        -onimage [Rappture::icon font-italic] \
    734734        -offimage [Rappture::icon font-italic] \
     
    758758        7,1 $page.dashes -fill x \
    759759
    760     blt::table configure $page r* -resize none
     760    blt::table configure $page r* -resize none -pady { 0 2 }
    761761    blt::table configure $page r8 -resize both
    762762
     
    830830        "symbol"  "Symbol" \
    831831        "times"  "Times"         
    832     bind $page.tickfontfamily <KeyPress-Return> \
    833         [itcl::code $this ApplyAxisSettings]
     832    bind $page.tickfontfamily <<Value>> [itcl::code $this ApplyAxisSettings]
    834833
    835834    Rappture::Combobox $page.tickfontsize -width 4 -editable no
    836835    $page.tickfontsize choices insert end \
    837836        "8" "8" \
     837        "9" "9" \
    838838        "10" "10" \
    839839        "11" "11" \
     
    843843        "18" "18" \
    844844        "20" "20"
    845     bind  $page.tickfontsize <KeyPress-Return> \
    846         [itcl::code $this ApplyAxisSettings]
     845    bind $page.tickfontsize <<Value>> [itcl::code $this ApplyAxisSettings]
    847846
    848847    Rappture::PushButton $page.tickfontbold \
    849         -width 26 -height 26 \
     848        -width 18 -height 18 \
    850849        -onimage [Rappture::icon font-bold] \
    851850        -offimage [Rappture::icon font-bold] \
     
    854853
    855854    Rappture::PushButton $page.tickfontitalic \
    856         -width 26 -height 26 \
     855        -width 18 -height 18 \
    857856        -onimage [Rappture::icon font-italic] \
    858857        -offimage [Rappture::icon font-italic] \
     
    868867        "symbol"  "Symbol" \
    869868        "times"  "Times"         
    870     bind $page.titlefontfamily <KeyPress-Return> \
    871         [itcl::code $this ApplyAxisSettings]
     869    bind $page.titlefontfamily <<Value>> [itcl::code $this ApplyAxisSettings]
    872870
    873871    Rappture::Combobox $page.titlefontsize -width 4 -editable no
    874872    $page.titlefontsize choices insert end \
    875873        "8" "8" \
     874        "9" "9" \
    876875        "10" "10" \
    877876        "11" "11" \
     
    881880        "18" "18" \
    882881        "20" "20"
    883     bind  $page.titlefontsize <KeyPress-Return> \
    884         [itcl::code $this ApplyAxisSettings]
     882    bind $page.tickfontsize <<Value>> [itcl::code $this ApplyAxisSettings]
    885883
    886884    Rappture::PushButton $page.titlefontbold \
    887         -width 26 -height 26 \
     885        -width 18 -height 18 \
    888886        -onimage [Rappture::icon font-bold] \
    889887        -offimage [Rappture::icon font-bold] \
     
    892890
    893891    Rappture::PushButton $page.titlefontitalic \
    894         -width 26 -height 26 \
     892        -width 18 -height 18 \
    895893        -onimage [Rappture::icon font-italic] \
    896894        -offimage [Rappture::icon font-italic] \
     
    905903        3,1 $page.min_l -anchor e \
    906904        3,2 $page.min -fill x \
    907         3,3 $page.max_l -anchor e \
    908         3,4 $page.max -fill both -cspan 3 \
    909         4,1 $page.stepsize_l -anchor e \
    910         4,2 $page.stepsize -fill both \
     905        3,3 $page.stepsize_l -anchor e \
     906        3,4 $page.stepsize -fill both -cspan 3 \
     907        4,1 $page.max_l -anchor e \
     908        4,2 $page.max -fill both \
    911909        4,3 $page.subdivisions_l -anchor e \
    912910        4,4 $page.subdivisions -fill both -cspan 3  \
     
    940938        SetComponentOption legend $option
    941939    }
     940    set slant "roman"
     941    if { $_settings($this-legend-font-italic) } {
     942        set slant "italic"
     943    }
     944    set weight "normal"
     945    if { $_settings($this-legend-font-bold) } {
     946        set weight "bold"
     947    }
     948    font configure $_fonts(legend) \
     949        -family [$page.fontfamily current] \
     950        -size [$page.fontsize current] \
     951        -weight $weight -slant $slant
     952    $_clone legend configure -font $_fonts(legend)
    942953    ApplyElementSettings
    943954}
     
    946957    set axis [$itk_component(axis_combo) current]
    947958    set type $Rappture::axistypes($axis)
     959    set page $itk_component(axis_page)
    948960    if { $_settings($this-axis-grid) } {
    949961        $_clone grid configure -hide no -map${type} ${axis}
     
    956968    }
    957969    $_clone marker configure ${type}-zero -hide $_settings($this-axis-zero)
     970    set slant "roman"
     971    if { $_settings($this-axis-titlefont-italic) } {
     972        set slant "italic"
     973    }
     974    set weight "normal"
     975    if { $_settings($this-axis-titlefont-bold) } {
     976        set weight "bold"
     977    }
     978    font configure $_fonts($axis-title) \
     979        -family [$page.titlefontfamily current] \
     980        -size [$page.titlefontsize current] \
     981        -weight $weight -slant $slant
     982    set slant "roman"
     983    if { $_settings($this-axis-tickfont-italic) } {
     984        set slant "italic"
     985    }
     986    set weight "normal"
     987    if { $_settings($this-axis-tickfont-bold) } {
     988        set weight "bold"
     989    }
     990    font configure $_fonts($axis-ticks) \
     991        -family [$page.tickfontfamily current] \
     992        -size [$page.tickfontsize current] \
     993        -weight $weight -slant $slant
     994    $_clone axis configure $axis -tickfont $_fonts($axis-ticks) \
     995        -titlefont $_fonts($axis-title)
    958996    GetAxis
    959997    RegeneratePreview
     
    10241062    # Always set the borderwidth to be not displayed
    10251063    set _settings($this-legend-borderwidth) 0
     1064    $page.fontfamily value "Helvetica"
     1065    $page.fontsize value "10"
     1066    set _settings($this-legend-font-bold) 0
     1067    set _settings($this-legend-font-italic) 0
    10261068
    10271069    set _settings($this-legend-hide) [$_clone legend cget -hide]
     
    10341076
    10351077    # Axis settings
     1078    set page $itk_component(axis_page)
    10361079    set names [lsort [$_clone axis names]]
    10371080    $itk_component(axis_combo) choices delete 0 end
     
    10421085        lappend axisnames $axis
    10431086    }
     1087    $page.titlefontfamily value "Helvetica"
     1088    $page.tickfontfamily value "Helvetica"
     1089    $page.titlefontsize value "10"
     1090    $page.tickfontsize value "10"
     1091    set _settings($this-axis-tickfont-bold) 0
     1092    set _settings($this-axis-tickfont-italic) 0
     1093    set _settings($this-axis-titlefont-bold) 0
     1094    set _settings($this-axis-titlefont-italic) 0
    10441095    # Always hide the zero line.
    10451096    set _settings($this-axis-zero) 1
    1046 
     1097    set _settings($this-axis-plotpad) [Pixels2Inches [$_clone cget -plotpadx]]
    10471098    # Pick the first axis to initially display
    10481099    set axis [lindex $axisnames 0]
    10491100    $itk_component(axis_combo) value $axis
    1050     blt::table configure $page r* -resize none
    1051     blt::table configure $page r9 -resize both
    10521101    GetAxis
    10531102}
Note: See TracChangeset for help on using the changeset viewer.