def gui_main(): """ The main function for GUI mode. This function sets up the GUI elements and launches the GUI event loop. """ app = App(title="Nikola", bg="black") text = Text(app, color="light sky blue") text.text_size = 36 keybox = Box(app, layout="grid", border=3) keybox.text_color = "white" keybox.bg = "gray" for row in range(4): keys.append([]) for col in range(4): key = Text(keybox, grid=[col, row], text=keypad.names[row][col], size=24) keys[row].append(key) slider = Slider(app, height=36, width="fill", end=100) slider.bg = "blue" slider.text_color = "white" app.repeat(100, gui_loop, args=[text, slider]) keypad.init() rotary_encoder.init() app.set_full_screen() app.display()
#a.bg = (255,255,0) text.text_color = "red" text.text_size = 30 text.font = "verdana" #text.bg = "green" check.bg = "#d41789" combo.bg = "blue" combo.text_color = None combo.text_size = 24 #button.bg = "black" button.text_color = (255, 0, 255) button.font = "arial" button.text_size = 18 slider.bg = (123, 234, 12) #textbox.bg = "cyan" textbox.font = "courier" textbox.text_color = "#FF0000" b.bg = "cyan" b.font = "wingdings" #bgroup.bg = "yellow" bgroup.text_color = "#e62112" bgroup.text_color = None bgroup.font = "book antiqua" #a.bg = (255,0,25) #a.font = "wingdings" a.text_color = (255, 253, 12) b.text_color = "purple" b.text_size = 18 a.display()
button11.when_clicked = highlight1 button11.when_mouse_leaves = lowlight1 button12 = PushButton(channel_box, command=load_channel_jeevan, text="Jeevan TV", grid=[3, 2], width=27, height=5) button12.text_size = 19 button12.when_clicked = highlight1 button12.when_mouse_leaves = lowlight1 # Contains the button and Text area for printing IP address ip_box = Box(app, width="fill", align="top", border=False) ip_box.bg = "#34495e" ip_box.text_color = "white" ip_button = PushButton(ip_box, command=get_ip, text="Get IP Address", width=30, align="right") ip_button.text_size = 15 ipdisplay = Text(ip_box, text=" ", size=20, font="Lato", color="white") # Contains the button and TextBox for YouTube search based on entered query youtube_box = Box(app, width="fill", align="top", border=False) youtube_box.bg = "#e74c3c" search_query_box = TextBox(youtube_box, width="fill", align="left", multiline=False)
align="left", ) openPearlerFile.bg = theme[4] """ start Print button """ StartButton = PushButton( app, command=lambda: menuFunctions.start_print(file_name, app), text="Start Print", grid=[0, 1], align="left") StartButton.bg = theme[4] """ Manual Control """ # controller box title controller_box = Box(app, layout="grid", grid=[1, 2]) controller_box.border = 2 controller_box.text_color = "white" text_box = Box(controller_box, grid=[1, 2, 6, 1]) Text( text_box, text="Manual Control", color="white", ) """ Aggregator """ slid_a = 0 a1 = Text( controller_box, text="Aggregator", grid=[1, 3], ) sliderA = Slider(controller_box, command=lambda: menuFunctions.move_aggregator(slid_a),