Skip to content

Commit

Permalink
First commit GUI, create main frame and button
Browse files Browse the repository at this point in the history
  • Loading branch information
Flavio0410 committed Dec 20, 2022
1 parent 4657bf8 commit 319c7cf
Show file tree
Hide file tree
Showing 4 changed files with 113 additions and 1 deletion.
Binary file added gui/elements/button_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gui/elements/button_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
112 changes: 112 additions & 0 deletions gui/gui.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@

# This file was generated by the Tkinter Designer by Parth Jadhav
# https://github.com/ParthJadhav/Tkinter-Designer


from pathlib import Path

# from tkinter import *
# Explicit imports to satisfy Flake8
from tkinter import Tk, Canvas, Entry, Text, Button, PhotoImage


OUTPUT_PATH = Path(__file__).parent
ASSETS_PATH = OUTPUT_PATH / Path(r"/Users/flavio/Desktop/prova/build/assets/frame0")


def relative_to_assets(path: str) -> Path:
return ASSETS_PATH / Path(path)


window = Tk()

window.geometry("800x608")
window.configure(bg = "#FFFFFF")


canvas = Canvas(
window,
bg = "#FFFFFF",
height = 608,
width = 800,
bd = 0,
highlightthickness = 0,
relief = "ridge"
)

canvas.place(x = 0, y = 0)
canvas.create_rectangle(
500.0,
0.0,
800.0,
600.0,
fill="#FFFFFF",
outline="")

canvas.create_text(
500.0,
0.0,
anchor="nw",
text="Exposure fusions",
fill="#000000",
font=("Inter Bold", 36 * -1)
)

button_image_1 = PhotoImage(
file=relative_to_assets("button_1.png"))
button_1 = Button(
image=button_image_1,
borderwidth=0,
highlightthickness=0,
command=lambda: print("button_1 clicked"),
relief="flat"
)
button_1.place(
x=550.0,
y=175.0,
width=200.0,
height=50.0
)

button_image_2 = PhotoImage(
file=relative_to_assets("button_2.png"))
button_2 = Button(
image=button_image_2,
borderwidth=0,
highlightthickness=0,
command=lambda: print("button_2 clicked"),
relief="flat"
)
button_2.place(
x=550.0,
y=440.0,
width=200.0,
height=50.0
)

canvas.create_text(
501.0,
574.0,
anchor="nw",
text="©Copyright 2022 Gezzi and Loi",
fill="#000000",
font=("Inter", 12 * -1)
)

canvas.create_rectangle(
549.0,
399.0,
750.0,
400.0,
fill="#000000",
outline="")

canvas.create_rectangle(
0.0,
0.0,
500.0,
600.0,
fill="#D9D9D9",
outline="")
window.resizable(False, False)
window.mainloop()
2 changes: 1 addition & 1 deletion gui/image_slider.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ def main():
app.mainloop()


#main()
main()

0 comments on commit 319c7cf

Please sign in to comment.