mirror of
https://gitlab.os-k.eu/neox/CNIRevelator.git
synced 2023-08-25 14:03:10 +02:00
Update ihm.py
This commit is contained in:
parent
4d72b625c5
commit
01c3c7fefa
@ -48,11 +48,11 @@ class LoginDialog(Toplevel):
|
|||||||
self.entry_pass.pack()
|
self.entry_pass.pack()
|
||||||
Button(self, text='Connexion', command=(self.connecti)).pack()
|
Button(self, text='Connexion', command=(self.connecti)).pack()
|
||||||
self.resizable(width=False, height=False)
|
self.resizable(width=False, height=False)
|
||||||
w = 150
|
|
||||||
h = 110
|
|
||||||
self.update()
|
|
||||||
ws = self.winfo_screenwidth()
|
ws = self.winfo_screenwidth()
|
||||||
hs = self.winfo_screenheight()
|
hs = self.winfo_screenheight()
|
||||||
|
w = hs / 10
|
||||||
|
h = ws / 10
|
||||||
|
self.update()
|
||||||
if getattr(sys, 'frozen', False):
|
if getattr(sys, 'frozen', False):
|
||||||
self.iconbitmap(sys._MEIPASS + '\\id-card.ico\\id-card.ico')
|
self.iconbitmap(sys._MEIPASS + '\\id-card.ico\\id-card.ico')
|
||||||
else:
|
else:
|
||||||
@ -80,18 +80,15 @@ class LauncherWindow(Tk):
|
|||||||
hs = self.winfo_screenheight()
|
hs = self.winfo_screenheight()
|
||||||
wheight = hs /4
|
wheight = hs /4
|
||||||
wwidth = ws /4
|
wwidth = ws /4
|
||||||
#self.update()
|
|
||||||
|
|
||||||
# Creating objects
|
# Creating objects
|
||||||
self.mainCanvas = Canvas(self, width=wwidth, height=wheight*9/10, bg=globs.CNIRLColor, highlightthickness=0)
|
self.mainCanvas = Canvas(self, width=wwidth, height=wheight*9/10, bg=globs.CNIRLColor, highlightthickness=0)
|
||||||
self.pBarZone = Canvas(self, width=wwidth, height=wheight/10, bg=globs.CNIRLColor)
|
self.pBarZone = Canvas(self, width=wwidth, height=wheight/10, bg=globs.CNIRLColor)
|
||||||
|
|
||||||
self.progressBar = ttk.Progressbar(self.pBarZone, orient=HORIZONTAL, length=wwidth-10, mode='determinate')
|
self.progressBar = ttk.Progressbar(self.pBarZone, orient=HORIZONTAL, length=wwidth-10, mode='determinate')
|
||||||
#self.update()
|
|
||||||
|
|
||||||
self.mainCanvas.create_text((wwidth / 2), (wheight / 3), text=(globs.CNIRName), font='Helvetica 30', fill='white')
|
self.mainCanvas.create_text((wwidth / 2), (wheight / 3), text=(globs.CNIRName), font='Helvetica 30', fill='white')
|
||||||
self.msg = self.mainCanvas.create_text((wwidth / 2.05), (wheight / 1.20), text='', font='Helvetica 9', fill='white')
|
self.msg = self.mainCanvas.create_text((wwidth / 2.05), (wheight / 1.20), text='Booting up...', font='Helvetica 9', fill='white')
|
||||||
#self.update()
|
|
||||||
|
|
||||||
self.wm_title(globs.CNIRName)
|
self.wm_title(globs.CNIRName)
|
||||||
|
|
||||||
@ -103,7 +100,6 @@ class LauncherWindow(Tk):
|
|||||||
self.pBarZone.grid()
|
self.pBarZone.grid()
|
||||||
self.progressBar.grid()
|
self.progressBar.grid()
|
||||||
|
|
||||||
#self.after(2000, updating)
|
|
||||||
|
|
||||||
if getattr(sys, 'frozen', False):
|
if getattr(sys, 'frozen', False):
|
||||||
self.iconbitmap(sys._MEIPASS + '\\id-card.ico\\id-card.ico')
|
self.iconbitmap(sys._MEIPASS + '\\id-card.ico\\id-card.ico')
|
||||||
@ -113,6 +109,8 @@ class LauncherWindow(Tk):
|
|||||||
logfile.printdbg('Launcher IHM successful')
|
logfile.printdbg('Launcher IHM successful')
|
||||||
self.protocol('WM_DELETE_WINDOW', lambda : self.destroy())
|
self.protocol('WM_DELETE_WINDOW', lambda : self.destroy())
|
||||||
|
|
||||||
|
self.update()
|
||||||
|
|
||||||
## Global Handler
|
## Global Handler
|
||||||
launcherWindowCur = LauncherWindow()
|
launcherWindowCur = LauncherWindow()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user