LINUX LITE 7.2 FINAL RELEASED - SEE RELEASE ANNOUNCEMENTS SECTION FOR DETAILS


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Who wants to write a basic About box for Linux Lite?
#24
(10-20-2018, 03:14 AM)Jerry link Wrote:#1 - Top logo also links to main website.
#2 - Add button somewhere logical that links to internal Help Manual. /usr/share/doc/litemanual/index.html
#3 - Could you please add our logo as a taskbar icon, points to in Series 4.x+: /usr/share/icons/Papirus/48x48/apps/liteicon.png (or whatever size suits)
#4 - Rename app to llabout.py
#5-  pull and display the current LL version from /etc/llver file.Hope you're enjoying the challenges. Smile

#1 - completed
#4 - completed

#1 Changed this to a button so a command to open the browser and go to main site can be added, this also lets the viewer know it is a button.
Resized the button so there is a border around the image icon.Change coordinates of x and y to align the button.

[Image: llabout1.png]


Code:
#!/usr/bin/env python
# code by bitsnpcs

from Tkinter import *
import webbrowser

url1 = 'https://www.freecinema2022.gq/development.html#team'
url2 = 'https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html'
url3 = 'https://www.freecinema2022.gq/'

# open browser and display url at line 7 thru 9
def OpenUrl1():
    webbrowser.open(url1)

def OpenUrl2():
    webbrowser.open(url2)

def OpenUrl3():
    webbrowser.open(url3)
   
def close_window():
    window.destroy()

# Make window
window = Tk()
window.title("About Linux Lite")
window.geometry("242x242")
window.resizable(0,0)

# adding a logo
photo=PhotoImage(file="logo.png")
l1 = Button(image=photo,width=160, height=59, command=OpenUrl3)
l1.grid(row=4, column=0)
l1.place(x=36.3, y=12)
l1 = Label(window, text="     ")
l1.grid(row=5, column=0, sticky=W)
l1 = Label(window, text="     ")
l1.grid(row=6, column=0, sticky=W)
l1 = Label(window, text="     ")
l1.grid(row=7, column=0, sticky=W)
l1 = Label(window, text="     ")
l1.grid(row=8, column=0, sticky=W)

# adding a frame for ll website button
GUIFrame1=Frame(window)
GUIFrame1.grid(row=11, column=0)

#adding a frame for last row of buttons
GUIFrame2=Frame(window)
GUIFrame2.grid(row=13, column=0)

# define title, nym, year
l2 = Label(window, text=u"\u00a9Copyright 2012-2018 Jerry Bezencon", fg="grey", font="none 8")
l2.grid(row=15, column=0)

l3 = Label(window, text="     ")
l3.grid(row=0, column=0, sticky=W)
l3 = Label(window, text="     ")
l3.grid(row=10, column=0, sticky=W)
l3 = Label(window, text="     ")
l3.grid(row=12, column=0, sticky=W)
l3 = Label(window, text="     ")
l3.grid(row=14, column=0, sticky=W)

l4 = Label(window, text="Current Version: 5.0")
l4.grid(row=9, column=0)

# ll website button
l5 = Label(GUIFrame1, text=" ")
l5.grid(row=11, column=0, sticky=W)
Button(GUIFrame1, text="Visit Linux Lite website", width=16, command=OpenUrl3).grid(row=11, column=0)

# last row of buttons
l6 = Label(GUIFrame2, text=" ")
l6.grid(row=13, column=0)
Button(GUIFrame2, text="Credits", width=6, command=OpenUrl1).grid(row=13, column=1)
Button(GUIFrame2, text="License", width=6, command=OpenUrl2).grid(row=13, column=2)
Button(GUIFrame2, text="Close", width=6, command=window.destroy).grid(row=13, column=3)

window.mainloop()


Reply


Messages In This Thread
Re: Who wants to write a basic About box for Linux Lite? - by bitsnpcs - 10-20-2018, 01:46 PM

Forum Jump:


Users browsing this thread: 3 Guest(s)