Skip to content

Commit 040dc7d

Browse files
committed
design updates
1 parent 7506192 commit 040dc7d

File tree

3 files changed

+46
-35
lines changed

3 files changed

+46
-35
lines changed

installer/macosx/CoderSetup.py

Lines changed: 46 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -27,47 +27,57 @@
2727
import tkFont
2828
import threading
2929

30-
BGCOLOR = "#f0f0f0"
31-
ACTIVECOLOR = "#55E7FF"
32-
TEXTCOLOR = "#999999"
33-
PROGRESSBG = "#909090"
34-
30+
WINWIDTH = 776
31+
WINHEIGHT = 390
32+
BGCOLOR = "#3BD7EA"
33+
ACTIVECOLOR = "#3BD7EA"
34+
TEXTCOLOR = "#FFFFFF"
35+
PROGRESSBG = "#FFFFFF"
36+
BTNTEXT = "#2AD4E7"
37+
BTNCOLOR = "#FFFFFF"
3538

3639
class Application(Frame):
3740

41+
def createStartButton(self, master, onclick):
42+
b = Label( master )
43+
b.config( text="START", highlightthickness=1, highlightbackground=ACTIVECOLOR, background=BTNCOLOR, foreground=BTNTEXT, width=12, height=3 )
44+
b.bind("<Button-1>", onclick)
45+
b.place( x=336, y=80, anchor=NW )
46+
return b
47+
3848
def createNextButton(self, master, onclick):
3949
b = Label( master )
40-
b.config( text="NEXT", highlightthickness=1, highlightbackground=ACTIVECOLOR, width=10, height=3, foreground=TEXTCOLOR )
50+
b.config( text="NEXT", highlightthickness=1, highlightbackground=ACTIVECOLOR, background=BTNCOLOR, foreground=BTNTEXT, width=12, height=3 )
4151
b.bind("<Button-1>", onclick)
42-
b.place( x=900, y=230, anchor=NW )
52+
b.place( x=336, y=80, anchor=NW )
4353
return b
4454

4555
def createDoneButton(self, master, onclick):
4656
b = Label( master )
47-
b.config( text="DONE", highlightthickness=1, highlightbackground=ACTIVECOLOR, width=10, height=3, foreground=TEXTCOLOR )
57+
b.config( text="OK", highlightthickness=1, highlightbackground=ACTIVECOLOR, background=BTNCOLOR, foreground=BTNTEXT, width=12, height=3 )
4858
b.bind("<Button-1>", onclick)
49-
b.place( x=900, y=230, anchor=NW )
59+
b.place( x=336, y=80, anchor=NW )
5060
return b
5161

5262
def createStartOverButton(self, master, onclick):
5363
b = Label( master )
54-
b.config( text="START OVER", highlightthickness=1, highlightbackground=ACTIVECOLOR, width=15, height=3, foreground=TEXTCOLOR )
64+
b.config( text="START OVER", highlightthickness=1, highlightbackground=ACTIVECOLOR, background=BTNCOLOR, foreground=BTNTEXT, width=12, height=3 )
5565
b.bind("<Button-1>", onclick)
56-
b.place( x=860, y=230, anchor=NW )
66+
b.place( x=336, y=80, anchor=NW )
5767
return b
5868

5969
def createFormatButton(self, master, onclick):
6070
b = Label( master )
61-
b.config( text="FORMAT", highlightthickness=1, highlightbackground=ACTIVECOLOR, width=15, height=3, foreground=TEXTCOLOR )
71+
b.config( text="INSTALL", highlightthickness=1, highlightbackground=ACTIVECOLOR, background=BTNCOLOR, foreground=BTNTEXT, width=12, height=3 )
6272
b.bind("<Button-1>", onclick)
63-
b.place( x=860, y=230, anchor=NW )
73+
b.place( x=336, y=80, anchor=NW )
6474
return b
6575

6676
def createInstructionTxt(self, master, text):
67-
instructionFont = tkFont.Font(family="Helvetica", size=20)
77+
instructionFont = tkFont.Font(family="Helvetica", size=18)
6878
instruction = Label( master, background=BGCOLOR, foreground=TEXTCOLOR, font=instructionFont )
6979
instruction["text"] = text
70-
instruction.place( relx=0.5, y=50, anchor=N )
80+
instruction.place( relx=0.5, y=14, anchor=N )
7181
return instruction
7282

7383

@@ -79,35 +89,36 @@ def createWidgets(self):
7989
#self.QUIT.place( relx=0, rely=1, anchor=SW )
8090

8191

82-
self.step1Frame = Frame( width=1000, height=300, background=BGCOLOR )
92+
self.step1Frame = Frame( width=WINWIDTH, height=190, background=BGCOLOR )
8393

84-
self.step1Frame.instruction = self.createInstructionTxt( self.step1Frame, "Remove any SD Cards from your computer and click Next." )
85-
self.step1Frame.nextButton = self.createNextButton( self.step1Frame, self.preStep2 )
94+
self.step1Frame.instruction = self.createInstructionTxt( self.step1Frame, "Remove any SD Cards from your computer and click Start." )
95+
self.step1Frame.nextButton = self.createStartButton( self.step1Frame, self.preStep2 )
8696

8797

88-
self.step2Frame = Frame( width=1000, height=300, background=BGCOLOR )
98+
self.step2Frame = Frame( width=WINWIDTH, height=190, background=BGCOLOR )
8999
self.step2Frame.nextButton = self.createNextButton( self.step2Frame, self.preStep3 )
90-
self.step2Frame.instruction = self.createInstructionTxt( self.step2Frame, "Now insert the SD Card you wish to format with Coder." )
100+
self.step2Frame.instruction = self.createInstructionTxt( self.step2Frame, "Insert an SD Card you wish to format with Coder." )
91101

92102

93-
self.step3Frame = Frame( width=1000, height=300, background=BGCOLOR )
103+
self.step3Frame = Frame( width=WINWIDTH, height=190, background=BGCOLOR )
94104
self.step3Frame.nextButton = self.createFormatButton( self.step3Frame, self.preStep4 )
95-
self.step3Frame.instruction = self.createInstructionTxt( self.step3Frame, "Click Format to completely erase this SD Card and install Coder." )
96-
self.step3Frame.progress = Meter( self.step3Frame, width=800, height=2, bg=PROGRESSBG, progcolor=ACTIVECOLOR )
105+
self.step3Frame.instruction = self.createInstructionTxt( self.step3Frame, "Click Install to format this SD Card and install Coder." )
106+
self.step3Frame.progress = Meter( self.step3Frame, width=600, height=6, bg=PROGRESSBG, progcolor=ACTIVECOLOR )
97107

98108

99-
self.step4Frame = Frame( width=1000, height=300, background=BGCOLOR )
109+
self.step4Frame = Frame( width=WINWIDTH, height=190, background=BGCOLOR )
100110
self.step4Frame.instruction = Label( self.step4Frame )
101-
self.step4Frame.instruction = self.createInstructionTxt( self.step4Frame, "You can now use this card in Raspberry Pi to run Coder." )
111+
self.step4Frame.instruction = self.createInstructionTxt( self.step4Frame, "Coder has been successfully installed. You may now remove your SD Card.\nFollow instructions at goo.gl/coder to get started." )
112+
self.step4Frame.instruction.place( relx=0.5, y=8, anchor=N )
102113
self.step4Frame.doneButton = self.createDoneButton( self.step4Frame, self.doneClick )
103114

104-
self.errorFrame = Frame( width=1000, height=300, background=BGCOLOR )
115+
self.errorFrame = Frame( width=WINWIDTH, height=190, background=BGCOLOR )
105116
self.errorFrame.soButton = self.createStartOverButton( self.errorFrame, self.step1 )
106117
self.errorFrame.instruction = Label( self.errorFrame )
107118
self.errorFrame.instruction = self.createInstructionTxt( self.errorFrame, "Error" )
108119

109120

110-
self.workingFrame = Frame( width=1000, height=300, background=BGCOLOR )
121+
self.workingFrame = Frame( width=WINWIDTH, height=190, background=BGCOLOR )
111122
self.workingFrame.instruction = Label( self.workingFrame )
112123
self.workingFrame.instruction = self.createInstructionTxt( self.workingFrame, "Thinking..." )
113124

@@ -117,7 +128,7 @@ def createWidgets(self):
117128
self.logo.config( background=BGCOLOR, image = self.logoimg )
118129

119130

120-
self.logo.place( x=340, y=100, anchor=NW )
131+
self.logo.place( x=170, y=55, anchor=NW )
121132
#self.logo.config( image = self.logoimg )
122133
#self.logo.geometry("+%d+%d" % (self.winfo_rootx()+50,
123134
# self.winfo_rooty()+50))
@@ -189,16 +200,16 @@ def preStep3( self, event=None ):
189200
self.errorRetry( "Your card wasn't correctly detected. Let's try again." )
190201
#self.errorRetry( "Error: found " + str( len( self.newDrives ) ) + " new disks inserted but expected 1" )
191202
else:
192-
self.showWorking( "Device found." )
203+
self.showWorking( "SD Card found." )
193204
self.update()
194205
time.sleep(2)
195206
self.step3()
196207

197208
def step3( self, event=None ):
198209
self.unPlace()
199210
self.step3Frame.progress.place_forget()
200-
self.step3Frame.nextButton.place( x=860, y=230, anchor=NW )
201-
self.step3Frame.instruction['text'] = "Click Format to completely erase this SD Card and install Coder."
211+
self.step3Frame.nextButton.place( x=336, y=80, anchor=NW )
212+
self.step3Frame.instruction['text'] = "Click Install to format this SD Card and install Coder."
202213
self.step3Frame.place( relx=0, rely=1, anchor=SW )
203214

204215

@@ -207,8 +218,8 @@ def preStep4( self, event=None ):
207218

208219
self.update_idletasks();
209220
self.step3Frame.nextButton.place_forget()
210-
self.step3Frame.progress.place( relx=0.5, y=100, anchor=N )
211-
self.step3Frame.instruction['text'] = "Writing to SD Card..."
221+
self.step3Frame.progress.place( relx=0.5, y=85, anchor=N )
222+
self.step3Frame.instruction['text'] = "Installing Coder on your SD Card."
212223
self.update_idletasks();
213224

214225
formatProgress = 0.0
@@ -251,7 +262,7 @@ def errorRetry( self, message ):
251262

252263
def __init__(self, master=None):
253264
Frame.__init__(self, master)
254-
self.config(width = 1000, height = 500, background="#f0f0f0")
265+
self.config(width = WINWIDTH, height = WINHEIGHT, background=BGCOLOR)
255266
self.createMenu()
256267
self.pack_propagate(0)
257268
self.pack()
@@ -364,7 +375,7 @@ def formatSDDevice():
364375
root = Tk()
365376
screen_width = root.winfo_screenwidth()
366377
screen_height = root.winfo_screenheight()
367-
root.geometry("1000x500+%d+%d" % (screen_width/2-500, screen_height/2-250))
378+
root.geometry("%dx%d+%d+%d" % (WINWIDTH, WINHEIGHT, screen_width/2-500, screen_height/2-250))
368379
root.wm_title("Coder for Pi")
369380
root.wm_client("Coder for Pi")
370381
root.lift()

installer/macosx/codersd.icns

535 KB
Binary file not shown.

installer/macosx/installerlogo.gif

21.2 KB
Loading

0 commit comments

Comments
 (0)