icons for user friendlyness

This commit is contained in:
jfsScience 2020-12-30 10:48:14 +01:00
parent cb6644ee02
commit 722dc07355
5 changed files with 15 additions and 16 deletions

View File

@ -304,11 +304,11 @@ class buildpanel(tk.Frame):
self.jfs4calhp.grid(row=device_row+1,column=5,sticky='e',padx=4)
self.jfs4nm_check = tk.Checkbutton(self,text="[nm] scale on/off",variable=self.jf.nm_checked,command=lambda CCDplot=CCDplot: self.updateplot(CCDplot))
self.jfs4nm_check.grid(row=shicg_row-1,column=4,sticky='w',padx=4)
self.jfsdark = tk.Button(self,text='save Darkline',fg="blue", command= darkline)
self.jfsdark = tk.Button(self,text='save Dark',image=self.jf.bulbOff,compound=tk.LEFT,fg="blue", command= darkline)
self.jfsdark.grid(row=shicg_row,column=4,sticky='e',padx=4)
self.jfsdark_check = tk.Checkbutton(self,text="Darkline on/off",variable=self.jf.darkline_checked,state=tk.DISABLED,command=lambda CCDplot=CCDplot: self.updateplot(CCDplot))
self.jfsdark_check.grid(row=shicg_row+1,column=4,sticky='w')
self.jfsbase = tk.Button(self,text='save Baseline',fg="blue", command= baseline)
self.jfsbase = tk.Button(self,text='save Base',image=self.jf.bulbOn,compound=tk.LEFT,fg="blue", command= baseline)
self.jfsbase.grid(row=shicg_row+2,column=4,sticky='e',padx=4)
self.jfsbase_check = tk.Checkbutton(self,text="Baseline on/off",variable=self.jf.baseline_checked,state=tk.DISABLED,command=lambda CCDplot=CCDplot: self.updateplot(CCDplot))
self.jfsbase_check.grid(row=shicg_row+3,column=4,sticky='w')

View File

@ -43,15 +43,16 @@ def center_window(size, window) :
return
def get_icon_image(xx):
directory_path = os.path.dirname(__file__)
file_path = os.path.join(directory_path, 'images\\')
image =Image.open(file_path+xx)
photo = ImageTk.PhotoImage(image)
return photo
def jfshelpme(win,helpfor):
#### this is where we store the pictures etc
directory_path = os.path.dirname(__file__)
file_path = os.path.join(directory_path, 'images\\')
top = tk.Toplevel(win)
scrolling = tk.Scrollbar(top)
scrolling.pack(side=tk.RIGHT, fill=tk.Y)
@ -63,14 +64,10 @@ def jfshelpme(win,helpfor):
scrolling.config(command=text.yview)
text.config(yscrollcommand=scrolling.set)
image1 = Image.open(file_path+'nm405.gif')
photoImg = ImageTk.PhotoImage(image1)
image2 = Image.open(file_path+'methods.gif')
photoImg2= ImageTk.PhotoImage(image2)
image3 = Image.open(file_path+'kinetics.gif')
photoImg3= ImageTk.PhotoImage(image3)
image4 = Image.open(file_path+'xenon.gif')
photoImg4= ImageTk.PhotoImage(image4)
photoImg = get_icon_image('nm405.gif')
photoImg2= get_icon_image('methods.gif')
photoImg3= get_icon_image('kinetics.gif')
photoImg4= get_icon_image('xenon.gif')
text.tag_configure('it', font=('Arial', 10, 'italic'))
text.tag_configure('h1', font=('Verdana', 16, 'bold'))

View File

@ -130,7 +130,9 @@ class Jfsphoto (object):
self.log = True
######### jfs methods
self.methods = []
######### get icons
self.bulbOn = get_icon_image('bulb-on.jpg')
self.bulbOff = get_icon_image('bulb-off.jpg')
def do_calibrate(self):
win = tk.Toplevel()

BIN
images/bulb-off.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 386 B

BIN
images/bulb-on.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 594 B