Skip to content

Commit

Permalink
python: Add links to online info
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Schaefer <[email protected]>
  • Loading branch information
JohnAZoidberg committed Nov 25, 2024
1 parent ca29198 commit cce7898
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions python/inputmodule/gui/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import os
import threading
import sys
import platform
import sys
import threading
import webbrowser

import tkinter as tk
from tkinter import ttk, messagebox

Expand Down Expand Up @@ -80,6 +82,21 @@ def run_gui(devices):
checkbox.pack(anchor="w")
device_checkboxes[dev.name] = (checkbox_var, checkbox)

# Online Info
info_frame = ttk.LabelFrame(tab1, text="Online Info", style="TLabelframe")
info_frame.pack(fill="x", padx=10, pady=5)
infos = {
"Web Interface": "https://ledmatrix.frame.work",
"Latest Releases": "https://github.com/FrameworkComputer/inputmodule-rs/releases",
"Hardware Info": "https://github.com/FrameworkComputer/InputModules",
}
for (i, (text, url)) in enumerate(infos.items()):
# Organize in columns of three
row = int(i / 3)
column = i % 3
btn = ttk.Button(info_frame, text=text, command=lambda url=url: webbrowser.open(url), style="TButton")
btn.grid(row=row, column=column)

# Brightness Slider
brightness_frame = ttk.LabelFrame(tab1, text="Brightness", style="TLabelframe")
brightness_frame.pack(fill="x", padx=10, pady=5)
Expand Down

0 comments on commit cce7898

Please sign in to comment.