aboutsummaryrefslogtreecommitdiff
path: root/menu.py
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@protonmail.com>2020-08-10 18:16:52 -0400
committerAndrew Lee <alee14498@protonmail.com>2020-08-10 18:16:52 -0400
commitd9cebec4532a82507aed2aff3516c7df4eaf973f (patch)
tree743c453accf41fa9916b20266c3a5963851aba92 /menu.py
parent5fab57bf82db283f8902183a1272bf498c6b473f (diff)
downloadRPi-Menu-d9cebec4532a82507aed2aff3516c7df4eaf973f.tar.gz
RPi-Menu-d9cebec4532a82507aed2aff3516c7df4eaf973f.tar.bz2
RPi-Menu-d9cebec4532a82507aed2aff3516c7df4eaf973f.zip
Putting button config in variable
Diffstat (limited to 'menu.py')
-rwxr-xr-xmenu.py18
1 files changed, 13 insertions, 5 deletions
diff --git a/menu.py b/menu.py
index eda9c4e..b4e0d0f 100755
--- a/menu.py
+++ b/menu.py
@@ -30,6 +30,14 @@ print("Starting Startup GUI")
print("Tkinter Version:" , tkinter.TkVersion)
+# Variables
+btnSizeW = 60
+btnSizeH = 3
+btnBG = "#8c8c8c"
+btnABG = "#666666"
+btnBD = 0
+btnRelief = "flat"
+
# Functions
def launchDesktop():
print("Launching Desktop")
@@ -65,11 +73,11 @@ varCopyright.set("(C) Copyright 2020, Andrew Lee. Licensed with GPL-3.0\nhttps:/
# Buttons
btnFont = tkFont.Font(size=12, weight="bold")
-btnDesktop = Button(root, text = 'Desktop', width=60, height=3, font=btnFont, bg="#8c8c8c", activebackground="#666666", bd=0, relief="flat", command = launchDesktop)
-btnDashboard = Button(root, text = 'Dashboard + Mycroft AI', width=60, height=3, font=btnFont, bg="#8c8c8c", activebackground="#666666", bd=0, relief="flat", command = launchDashboard)
-btnRetroPie = Button(root, text = 'RetroPie', width=60, height=3, font=btnFont, bg="#8c8c8c", activebackground="#666666", bd=0, relief="flat", command = launchRetroPie)
-btnSteamLink = Button(root, text = 'Steam Link', width=60, height=3, font=btnFont, bg="#8c8c8c", activebackground="#666666", bd=0, relief="flat", command = launchSteam)
-btnKodi = Button(root, text = 'Kodi', width=60, height=3, font=btnFont, bg="#8c8c8c", activebackground="#666666", relief="flat", bd=0, command = launchKodi)
+btnDesktop = Button(root, text = 'Desktop', width=btnSizeW, height=btnSizeH, font=btnFont, bg=btnBG, activebackground=btnABG, bd=btnBD, relief=btnRelief, command = launchDesktop)
+btnDashboard = Button(root, text = 'Dashboard + Mycroft AI', width=btnSizeW, height=btnSizeH, font=btnFont, bg=btnBG, activebackground=btnABG, bd=btnBD, relief=btnRelief, command = launchDashboard)
+btnRetroPie = Button(root, text = 'RetroPie', width=btnSizeW, height=btnSizeH, font=btnFont, bg=btnBG, activebackground=btnABG, bd=btnBD, relief=btnRelief, command = launchRetroPie)
+btnSteamLink = Button(root, text = 'Steam Link', width=btnSizeW, height=btnSizeH, font=btnFont, bg=btnBG, activebackground=btnABG, bd=btnBD, relief=btnRelief, command = launchSteam)
+btnKodi = Button(root, text = 'Kodi', width=btnSizeW, height=btnSizeH, font=btnFont, bg=btnBG, activebackground=btnABG, relief=btnRelief, bd=btnBD, command = launchKodi)
# Add the stuff
labelWelcome.pack()