From e0078ac2aa95aaace91749f72f9de62383b4e2f8 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Mon, 11 Sep 2006 15:27:47 +0000 Subject: [PATCH] Allow fonts for astronomical data to be set from the wsjtrc resource database. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/trunk@296 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- astro.py | 6 +----- g.py | 1 + wsjt.py | 6 ++---- wsjtrc.win | 1 + 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/astro.py b/astro.py index 6fc8ab2d4..c497e21b7 100644 --- a/astro.py +++ b/astro.py @@ -44,11 +44,7 @@ def update(): g.astro_geom=root.geometry() frame.after(1000,update) -if g.Win32: - g2font='"Lucida Console" 16' -else: - g2font='courier 16 bold' - +g2font=g.g2font lab1=Label(frame,font=g2font,justify=LEFT,bg="#66FFFF", relief=RIDGE,bd=4,anchor=N) lab1.pack(ipadx=4) diff --git a/g.py b/g.py index 565ef7b07..244b1a0aa 100644 --- a/g.py +++ b/g.py @@ -6,6 +6,7 @@ report="26" rms=1.0 mode_change=0 showspecjt=0 +g2font='courier 16 bold' #------------------------------------------------------ ftnstr def ftnstr(x): diff --git a/wsjt.py b/wsjt.py index 4dc1e5dfc..9b161cb3c 100644 --- a/wsjt.py +++ b/wsjt.py @@ -1322,10 +1322,6 @@ def update(): if mode.get()[:4]=='JT65' or mode.get()[:2]=='CW' : graph2.delete(ALL) - if g.Win32: - g2font='"Lucida Console" 16' - else: - g2font='courier 16 bold' graph2.create_text(80,13,anchor=CENTER,text="Moon",font=g2font) graph2.create_text(13,37,anchor=W, text="Az: %6.2f" % g.AzMoon,font=g2font) graph2.create_text(13,61,anchor=W, text="El: %6.2f" % g.ElMoon,font=g2font) @@ -1712,6 +1708,8 @@ Widget.bind(graph1,"",mouse_click_g1) graph1.pack(side=LEFT) graph2=Canvas(iframe1, bg='black', width=150, height=120,cursor='crosshair') graph2.pack(side=LEFT) +g2font=graph2.option_get("font","font") +if g2font!="": g.g2font=g2font iframe1.pack(expand=1, fill=X, padx=4) #------------------------------------------------------ Labels under graphics diff --git a/wsjtrc.win b/wsjtrc.win index 045f70637..6c1bca5ff 100644 --- a/wsjtrc.win +++ b/wsjtrc.win @@ -1,6 +1,7 @@ *font: Arial 8 *Label*font: Arial 8 *Text*font: "Courier New" 9 +*Canvas*font: "Lucida Console" 16 *background: gray85 *Text*background: white *Entry*background: white