1010import subprocess
1111import platformdirs
1212import languagesetup # import local file "languagesetup.py"
13+ import webbrowser
1314print ("Import finished." )
1415
1516#Get run_path and config-folder (create config-folder if not exist)
@@ -64,6 +65,9 @@ def aboutprogram():
6465 showinfolines = ["Datum & Uhrzeit Syncronisierer" , "Entwickelt von Palace4Software" , "" , showversion , "" , "" , "Diese Software unterliegt der MIT-Lizenz." ]
6566 messagebox .showinfo ("Über das Programm" , "\n " .join (showinfolines ))
6667
68+ def openweb (url ):
69+ webbrowser .open (url )
70+
6771def syncfin (successfulchecker ): #Messagebox after syncronization (with multilanguagesupport)
6872 if successfulchecker .returncode == 0 :
6973 if language == "1" or language == "None" :
@@ -168,7 +172,7 @@ def syncstart():
168172print ("Initalize main program..." )
169173GUI = gui .Tk ()
170174GUI .title ("Date/Time Syncronizer" )
171- GUI .geometry ("300x375 " )
175+ GUI .geometry ("300x400 " )
172176GUI .resizable (width = False , height = False )
173177
174178## Setup background and button
@@ -179,15 +183,15 @@ def syncstart():
179183
180184#Headline (Title)
181185print ("Set headline..." )
182- img_path = str (run_path + "/images/icon.png" )
183- img = gui .PhotoImage (file = img_path ).subsample (32 )
184- headline = gui .Label (GUI , text = "Date & Time Syncronizer" , font = ("Liberation Serif" , 13 ), image = img , compound = "right" )
186+ headline = gui .Label (GUI , text = "Date & Time Syncronizer" , font = ("Liberation Serif" , 13 ))
185187headline .pack (expand = True , fill = "x" )
186188
187- #Space between headline and buttons
188- print ("Set space between headline and buttons" )
189- spaceholder2 = gui .Label (GUI )
190- spaceholder2 .pack (expand = True , fill = "both" )
189+ #logo and space between headline and buttons
190+ print ("Load logo..." )
191+ img_path = str (run_path + "/images/icon.png" )
192+ img = gui .PhotoImage (file = img_path ).subsample (20 )
193+ imageline = gui .Button (GUI , image = img , compound = "center" , command = lambda : openweb ("https://github.com/Palace4Software/timesync" ), cursor = "hand2" )
194+ imageline .pack (pady = 15 )
191195
192196#Buttons
193197print ("Initalize buttons..." )
@@ -209,10 +213,10 @@ def syncstart():
209213
210214#Buttons (Exit, About)
211215print ("Set About button..." )
212- button7 = gui .Button (GUI , text = "About" , command = aboutprogram )
216+ button7 = gui .Button (GUI , text = " About " , command = aboutprogram )
213217button7 .pack (side = "left" )
214218print ("Set Exit button..." ) #must be set before button7
215- button8 = gui .Button (GUI , text = "Exit" , command = exitprogram )
219+ button8 = gui .Button (GUI , text = " Exit " , command = exitprogram )
216220button8 .pack (side = "right" )
217221print ("Set Change language button..." )
218222button6 = gui .Button (GUI , text = "Change language" , command = changelang )
0 commit comments