Retire the Splash Screen and Beautify GUI., thanks skyscooby
This commit is contained in:
@@ -1 +1 @@
|
|||||||
Version 2.7.4-stable+timestamp.2013.11.19.17.37.28
|
Version 2.7.4-stable+timestamp.2013.11.20.09.40.10
|
||||||
|
|||||||
+15
-12
@@ -233,9 +233,9 @@ class web2pyDialog(object):
|
|||||||
# IP
|
# IP
|
||||||
Tkinter.Label(self.root,
|
Tkinter.Label(self.root,
|
||||||
text='Server IP:', bg=bg_color,
|
text='Server IP:', bg=bg_color,
|
||||||
justify=Tkinter.LEFT).grid(row=4,
|
justify=Tkinter.RIGHT).grid(row=4,
|
||||||
column=1,
|
column=1,
|
||||||
sticky=sticky)
|
sticky=sticky)
|
||||||
self.ips = {}
|
self.ips = {}
|
||||||
self.selected_ip = Tkinter.StringVar()
|
self.selected_ip = Tkinter.StringVar()
|
||||||
row = 4
|
row = 4
|
||||||
@@ -246,8 +246,9 @@ class web2pyDialog(object):
|
|||||||
for ip, legend in ips:
|
for ip, legend in ips:
|
||||||
self.ips[ip] = Tkinter.Radiobutton(
|
self.ips[ip] = Tkinter.Radiobutton(
|
||||||
self.root, bg=bg_color, highlightthickness=0,
|
self.root, bg=bg_color, highlightthickness=0,
|
||||||
selectcolor='light grey', width=20,
|
selectcolor='light grey', width=30,
|
||||||
anchor=Tkinter.W, text='%s (%s)' % (legend, ip),
|
anchor=Tkinter.W, text='%s (%s)' % (legend, ip),
|
||||||
|
justify=Tkinter.LEFT,
|
||||||
variable=self.selected_ip, value=ip)
|
variable=self.selected_ip, value=ip)
|
||||||
self.ips[ip].grid(row=row, column=2, sticky=sticky)
|
self.ips[ip].grid(row=row, column=2, sticky=sticky)
|
||||||
if row == 4:
|
if row == 4:
|
||||||
@@ -258,7 +259,7 @@ class web2pyDialog(object):
|
|||||||
# Port
|
# Port
|
||||||
Tkinter.Label(self.root,
|
Tkinter.Label(self.root,
|
||||||
text='Server Port:', bg=bg_color,
|
text='Server Port:', bg=bg_color,
|
||||||
justify=Tkinter.LEFT).grid(row=shift,
|
justify=Tkinter.RIGHT).grid(row=shift,
|
||||||
column=1, pady=10,
|
column=1, pady=10,
|
||||||
sticky=sticky)
|
sticky=sticky)
|
||||||
|
|
||||||
@@ -269,7 +270,7 @@ class web2pyDialog(object):
|
|||||||
# Password
|
# Password
|
||||||
Tkinter.Label(self.root,
|
Tkinter.Label(self.root,
|
||||||
text='Choose Password:', bg=bg_color,
|
text='Choose Password:', bg=bg_color,
|
||||||
justify=Tkinter.LEFT).grid(row=shift + 1,
|
justify=Tkinter.RIGHT).grid(row=shift + 1,
|
||||||
column=1,
|
column=1,
|
||||||
sticky=sticky)
|
sticky=sticky)
|
||||||
|
|
||||||
@@ -280,29 +281,31 @@ class web2pyDialog(object):
|
|||||||
|
|
||||||
# Prepare the canvas
|
# Prepare the canvas
|
||||||
self.canvas = Tkinter.Canvas(self.root,
|
self.canvas = Tkinter.Canvas(self.root,
|
||||||
width=300,
|
width=400,
|
||||||
height=100,
|
height=100,
|
||||||
bg='black')
|
bg='black')
|
||||||
self.canvas.grid(row=shift + 2, column=0, columnspan=4, pady=5)
|
self.canvas.grid(row=shift + 2, column=1, columnspan=2, pady=5,
|
||||||
|
sticky=sticky)
|
||||||
self.canvas.after(1000, self.update_canvas)
|
self.canvas.after(1000, self.update_canvas)
|
||||||
|
|
||||||
# Prepare the frame
|
# Prepare the frame
|
||||||
frame = Tkinter.Frame(self.root)
|
frame = Tkinter.Frame(self.root)
|
||||||
frame.grid(row=shift + 3, column=1, columnspan=2, pady=5)
|
frame.grid(row=shift + 3, column=1, columnspan=2, pady=5,
|
||||||
|
sticky=sticky)
|
||||||
|
|
||||||
# Start button
|
# Start button
|
||||||
self.button_start = Tkinter.Button(frame,
|
self.button_start = Tkinter.Button(frame,
|
||||||
text='start server',
|
text='start server',
|
||||||
command=self.start)
|
command=self.start)
|
||||||
|
|
||||||
self.button_start.grid(row=0, column=1)
|
self.button_start.grid(row=0, column=0, sticky=sticky)
|
||||||
|
|
||||||
# Stop button
|
# Stop button
|
||||||
self.button_stop = Tkinter.Button(frame,
|
self.button_stop = Tkinter.Button(frame,
|
||||||
text='stop server',
|
text='stop server',
|
||||||
command=self.stop)
|
command=self.stop)
|
||||||
|
|
||||||
self.button_stop.grid(row=0, column=2)
|
self.button_stop.grid(row=0, column=1, sticky=sticky)
|
||||||
self.button_stop.configure(state='disabled')
|
self.button_stop.configure(state='disabled')
|
||||||
|
|
||||||
if options.taskbar:
|
if options.taskbar:
|
||||||
@@ -573,7 +576,7 @@ class web2pyDialog(object):
|
|||||||
except BaseException:
|
except BaseException:
|
||||||
self.t0 = time.time()
|
self.t0 = time.time()
|
||||||
self.t0 = t1
|
self.t0 = t1
|
||||||
self.p0 = [100] * 300
|
self.p0 = [100] * 400
|
||||||
self.q0 = [self.canvas.create_line(i, 100, i + 1, 100,
|
self.q0 = [self.canvas.create_line(i, 100, i + 1, 100,
|
||||||
fill='green') for i in xrange(len(self.p0) - 1)]
|
fill='green') for i in xrange(len(self.p0) - 1)]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user