Changeset 419 for trunk/expgui


Ignore:
Timestamp:
Dec 4, 2009 5:05:51 PM (11 years ago)
Author:
toby
Message:

# on 2001/09/04 22:08:10, toby did:
adjustable font support

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/expgui

    • Property rcs:date changed from 2001/06/29 18:06:31 to 2001/09/04 22:08:10
    • Property rcs:lines changed from +90 -16 to +34 -23
    • Property rcs:rev changed from 1.44 to 1.45
    r399 r419  
    7878# misc constants
    7979set txtvw(font) "Courier"
    80 set expgui(coordfont) "-*-courier-bold-r-normal--12-*"
    81 set expgui(histfont) "-*-courier-bold-r-normal--12-*"
     80set expgui(font) 14
    8281set liveplot(hst) 1
    8382set liveplot(legend) 1
     
    126125if {!$expgui(haveBW)} {source [file join $expgui(scriptdir) notebook.tcl]}
    127126#----------------------------------------------------------------
    128 if [file exists [file join $expgui(scriptdir) opts.tcl]] {
    129     source [file join $expgui(scriptdir) opts.tcl]
    130 }
     127source [file join $expgui(scriptdir) opts.tcl]
    131128# fetch EXP file processing routines
    132129source [file join $expgui(scriptdir) readexp.tcl]
     
    147144    source [file join ~ .gsas_config]
    148145}
     146SetTkDefaultOptions $expgui(font)
    149147#---------------------------------------------------------------------------
    150148# platform-specific code
     
    509507    global expgui env tcl_platform
    510508    set fp [open [file join ~ .gsas_config] a]
    511     foreach item {archive asorttype hsorttype filesort disaglSeparateBox} {
     509    foreach item {archive asorttype hsorttype filesort disaglSeparateBox font autoexpload autoiconify} {
    512510        puts $fp "set expgui($item) $expgui($item)"
    513511    }
     
    515513        puts $fp "set env(GSASBACKSPACE) $env(GSASBACKSPACE)"
    516514    }
    517     puts $fp "set expgui(archive) $expgui(archive)"
    518     puts $fp "set expgui(autoexpload) $expgui(autoexpload)"
    519     puts $fp "set expgui(autoiconify) $expgui(autoiconify)"
    520515    close $fp
    521516}
     
    602597    frame $w.bot
    603598    pack $w.bot -side bottom
    604     frame $w.top
     599    frame $w.top -class FixedFont
    605600    pack $w.top -side top -fill both -expand 1
    606601    label $w.top.msg -justify left \
     
    12521247    bind $frm.mode <Button-3> {set expgui(globalmode) 0; sethistlist}
    12531248    grid [listbox $frm.title -height 1 -relief flat \
    1254             -exportselection 0 \
    1255             -font $expgui(histfont) ] -row 1 -column 0 -sticky ew
     1249            -exportselection 0 ] -row 1 -column 0 -sticky ew
    12561250    grid [listbox $frm.lbox -height 10 -width 25 \
    12571251            -exportselection 0 \
    1258             -font $expgui(histfont) \
    12591252            -xscrollcommand "$frm.x set" \
    12601253            -yscrollcommand "$frm.y set" \
     
    27472740if $expgui(haveBW) {
    27482741    pack [NoteBook .n -bd 2] -expand yes -fill both
     2742    # this should not be needed, but for some reason NoteBook is not
     2743    # using the optionDB
     2744    catch {.n configure -font [option get .n font Canvas]}
    27492745    foreach item $expgui(notebookpagelist) {
    27502746        set frm [lindex $item 0]
     
    28232819    #  This is a big frame in the Phase notebook pane to hold atomic data.
    28242820    set fbig [frame $expgui(phaseFrame).fbig -width 180 \
    2825             -relief raised -borderwidth 4]
     2821            -relief raised -borderwidth 4 -class Coord]
    28262822    #  This is a frame just below the big frame: for edits
    28272823    set frame3 [frame $expgui(phaseFrame).frame3 -width 100 \
     
    28582854    incr row
    28592855    foreach col {2 4 6} var {alpha beta gamma} lbl {a b g} {
    2860         grid [label $frameLatt.l$var -text $lbl -font symbol] \
     2856        grid [label $frameLatt.l$var -text $lbl] \
    28612857                -column $col -row $row -padx 5 -sticky e
     2858        set font [$frameLatt.l$var cget -font]
     2859        $frameLatt.l$var config -font "Symbol [lrange $font 1 end]"
     2860
    28622861        incr col
    28632862        grid [entry $frameLatt.e$var -textvariable entryvar($var) -width 10] \
     
    28952894    bind $expgui(atomtitle) <Button-3> {set expgui(asorttype) number; DisplayAllAtoms}
    28962895
    2897     $expgui(atomtitle) configure -font $expgui(coordfont) -selectmode extended
     2896    $expgui(atomtitle) configure -selectmode extended
    28982897    grid [listbox   $fbig.lbox -height 10 \
    28992898            -exportselection 0 \
     
    29022901            ] -row 1 -column 0 -sticky news
    29032902    set expgui(atomlistbox) $fbig.lbox
    2904     $expgui(atomlistbox) configure -font $expgui(coordfont) -selectmode extended
     2903    $expgui(atomlistbox) configure -selectmode extended
    29052904    grid [scrollbar $fbig.bscr -orient horizontal \
    29062905            -command "move2boxes \" $fbig.title $fbig.lbox \" " \
     
    30133012
    30143013proc move2boxes {boxlist args} {
    3015     foreach listbox $boxlist {
    3016         eval $listbox xview $args
     3014    foreach lbox $boxlist {
     3015        eval $lbox xview $args
    30173016    }
    30183017}
     
    30273026    grid rowconfigure $expgui(histFrame) 3 -weight 1
    30283027
    3029     grid [frame $expgui(histFrame).hs] \
     3028    grid [frame $expgui(histFrame).hs -class HistList] \
    30303029            -column 0 -row 0 -rowspan 10 -sticky nsew
    30313030    MakeHistBox $expgui(histFrame).hs
     
    31023101    global expgui entryvar entrybox
    31033102
    3104     pack [frame $expgui(fracFrame).hs] -side left -expand y -fill both
     3103    pack [frame $expgui(fracFrame).hs -class HistList] \
     3104            -side left -expand y -fill both
    31053105    MakeHistBox $expgui(fracFrame).hs
    31063106    bind $expgui(fracFrame).hs.lbox <ButtonRelease-1> {
     
    31863186    global expgui
    31873187    # v v v v v v v v v v BEGINNING OF PROFILE PANE CODE v v v v v v v v v v v
    3188     pack [frame $expgui(profFrame).hs] -side left -expand y -fill both
     3188    pack [frame $expgui(profFrame).hs -class HistList] \
     3189            -side left -expand y -fill both
    31893190    MakeHistBox $expgui(profFrame).hs
    31903191    bind $expgui(profFrame).hs.lbox <ButtonRelease-1> {
     
    32363237    9 "Print zero/unit pole figure constraint terms"
    32373238}
    3238 pack [frame $expgui(lsFrame).hs] -side left -expand y -fill both
     3239pack [frame $expgui(lsFrame).hs -class HistList] \
     3240        -side left -expand y -fill both
    32393241MakeHistBox $expgui(lsFrame).hs
    32403242bind $expgui(lsFrame).hs.lbox <ButtonRelease-1> {
     
    35033505}
    35043506
     3507$expgui(fm).option.menu add cascade -menu  $expgui(fm).option.menu.font \
     3508        -label "Screen font"
     3509menu $expgui(fm).option.menu.font
     3510foreach f {10 11 12 13 14 16 18 20} {
     3511    $expgui(fm).option.menu.font add radiobutton \
     3512            -command {SetTkDefaultOptions $expgui(font); ResizeFont .; ResizeNotebook} \
     3513        -label $f -value $f -variable expgui(font) -font "Helvetica -$f"
     3514}
     3515
    35053516$expgui(fm).option.menu  add checkbutton -label "Show EXPTOOL output" \
    35063517        -variable expgui(showexptool)
Note: See TracChangeset for help on using the changeset viewer.