add UI
This commit is contained in:
parent
18575abdc9
commit
c7d990f180
|
@ -11,10 +11,11 @@ class Main(customtkinter.CTk):
|
|||
mainFrame = MainFrame(self)
|
||||
mainFrame.grid(row=0, column=0, padx=10, pady=10,sticky="nsew")
|
||||
self.title("VeracityAI")
|
||||
self.geometry("1300x800")
|
||||
self.geometry("800x500")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
customtkinter.deactivate_automatic_dpi_awareness()
|
||||
customtkinter.set_appearance_mode("dark")
|
||||
app = Main()
|
||||
app.mainloop()
|
|
@ -1,4 +1,4 @@
|
|||
from typing import Any, Tuple
|
||||
from typing import Any
|
||||
import customtkinter as ctk
|
||||
|
||||
class MainFrame(ctk.CTkFrame):
|
||||
|
@ -6,16 +6,35 @@ class MainFrame(ctk.CTkFrame):
|
|||
def __init__(self, master: Any, **kwargs):
|
||||
super().__init__(master, **kwargs)
|
||||
|
||||
entry_url = ctk.CTkEntry(self, placeholder_text='Web link to article', width=290, height=50)
|
||||
entry_url.grid(row=0, column=0, padx=20, pady=10)
|
||||
# Konfiguriere das Hauptframe, um sich zu dehnen
|
||||
self.grid_rowconfigure(0, weight=1)
|
||||
self.grid_columnconfigure(0, weight=1) # Linke Spalte soll sich dehnen
|
||||
self.grid_columnconfigure(1, weight=0) # Mittlere Spalte (Button) soll sich nicht dehnen
|
||||
self.grid_columnconfigure(2, weight=1) # Rechte Spalte soll sich dehnen
|
||||
|
||||
input_textbox = ctk.CTkTextbox(self, width=290, height=200)
|
||||
input_textbox.grid(row=1,column=0, padx=10, pady=10)
|
||||
# Linkes Frame
|
||||
frame1 = ctk.CTkFrame(self)
|
||||
frame1.grid(row=0, column=0, sticky="nsew", padx=10, pady=10)
|
||||
frame1.grid_rowconfigure(2, weight=1) # Lasse die Output-Textbox wachsen
|
||||
frame1.grid_columnconfigure(0, weight=1) # Lasse frame1 horizontal wachsen
|
||||
|
||||
output_textbox = ctk.CTkTextbox(self, width=290, height=150, state= "disabled")
|
||||
output_textbox.grid(row=2,column=0, padx=10, pady=10)
|
||||
entry_url = ctk.CTkEntry(frame1, placeholder_text='Web link to article', height=50)
|
||||
entry_url.grid(row=0, column=0, padx=10, pady=10, sticky="ew")
|
||||
|
||||
check_button = ctk.CTkButton(self,text="Check",width=100,height=50)
|
||||
check_button.grid(row=0,column=1, padx=10, pady=10, sticky="nsew")
|
||||
input_textbox = ctk.CTkTextbox(frame1, height=200)
|
||||
input_textbox.grid(row=1, column=0, padx=10, pady=10, sticky="nsew")
|
||||
|
||||
|
||||
output_textbox = ctk.CTkTextbox(frame1, height=150, state="disabled")
|
||||
output_textbox.grid(row=2, column=0, padx=10, pady=10, sticky="nsew")
|
||||
|
||||
# Mittlerer Button
|
||||
check_button = ctk.CTkButton(self, text="Check", width=60, height=300, fg_color="green")
|
||||
check_button.grid(row=0, column=1, padx=10, pady=10, sticky="nsew")
|
||||
|
||||
# Rechte scrollbare Ansicht
|
||||
scrollview = ctk.CTkScrollableFrame(self)
|
||||
scrollview.grid(row=0, column=2, padx=10, pady=10, sticky="nsew")
|
||||
|
||||
# Überschrift hinzufügen
|
||||
header = ctk.CTkLabel(scrollview, text="Leaderboard", font=("Arial", 24, "bold"))
|
||||
header.pack(pady=10, padx=10, anchor="w")
|
Reference in New Issue