Skip to content

Commit

Permalink
change object position in gui
Browse files Browse the repository at this point in the history
  • Loading branch information
Flavio0410 committed Dec 21, 2022
1 parent 43d348d commit 0f7c310
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 109 deletions.
Binary file removed gui/elements/circle.png
Binary file not shown.
145 changes: 36 additions & 109 deletions gui/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,116 +29,43 @@ def select_file():
window.geometry("800x600")
window.configure(bg = "#FFFFFF")

#Main frame
main_frame = Canvas(master = window, bg = "#FFFFFF", height = 600, width = 800, bd = 0, highlightthickness = 0, relief = "ridge")
main_frame.place(x = 0, y = 0)
main_frame.create_rectangle(500.0, 0.0, 800.0, 600.0, fill="#FFFFFF", outline="")

#Title
main_frame.create_text( 570, 30.0, anchor="nw",text="Exposure \n fusions", fill="#000000", font=("Inter Bold", 38 * -1))

#Listbox path
listbox = Listbox(window)
listbox.place(x=550.0, y=150.0, width=200.0, height=150.0)

#Upload button, on click open task to select file-
upload_button_image = PhotoImage(file=relative_to_assets("button_1.png"))
upload_button = Button(image=upload_button_image, borderwidth=0, highlightthickness=0, command=select_file, relief="flat")
upload_button.place(x=550.0, y=380.0, width=200.0, height=50.0)


#Line
main_frame.create_line(550.0, 460.0, 750.0, 460.0 , fill="#000000", width=1.0)


#Execute button, on click execute the task-
execute_button_image = PhotoImage(file=relative_to_assets("button_2.png"))
execute_button = Button(image=execute_button_image, borderwidth=0, highlightthickness=0, command=lambda: print("button_2 clicked"),relief="flat")
execute_button.place(x=550.0,y=490.0,width=200.0,height=50.0)


#Text
main_frame.create_text(540.0, 575.0, anchor="nw", text="©Copyright 2022 Gezzi Flavio and Loi Dario", fill="#000000",font=("Inter", 12 * -1))


#Slider Frame
slider_frame = Canvas(window,bg = "#FFFFFF",height = 600,width = 500,bd = 0,highlightthickness = 0,relief = "ridge")
slider_frame.place(x = 0, y = 0)
app = Application(master=slider_frame)

canvas = Canvas(
window,
bg = "#FFFFFF",
height = 600,
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(
570,
30.0,
anchor="nw",
text="Exposure \n fusions",
fill="#000000",
font=("Inter Bold", 38 * -1)
)

button_image_1 = PhotoImage(
file=relative_to_assets("button_1.png"))
button_1 = Button(
image=button_image_1,
borderwidth=0,
highlightthickness=0,
command=select_file,
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(
540.0,
575.0,
anchor="nw",
text="©Copyright 2022 Gezzi Flavio and Loi Dario",
fill="#000000",
font=("Inter", 12 * -1)
)

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

###############
# Create a rectangle
# x = 0, y = 0, width = 500, height = 600
###############
canvas.create_rectangle(

0.0,
0.0,
500.0,
600.0,
fill="#D9D9D9",
outline="")

rettangoloslider = Canvas(
window,
bg = "#FFFFFF",
height = 600,
width = 500,
bd = 0,
highlightthickness = 0,
relief = "ridge"
)
rettangoloslider.place(x = 0, y = 0)
app = Application(master=rettangoloslider)


#listbox = Listbox(window, width=20, height=10)

#listbox.insert(1,"path1")
#listbox.insert(2, "path2")

#listbox.pack()

def build():
window.resizable(False, False)
Expand Down

0 comments on commit 0f7c310

Please sign in to comment.