Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions LEGAL_INFORMATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -888,4 +888,14 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```

---

### Third-Party Assets from Icons8

We use icons provided by [Icons8](https://icons8.com/) under the free license, which requires attribution.
All Icons8 icons used in this application are © Icons8 and are subject to their [Terms of Use](https://icons8.com/license).

Icons8 attribution:
Icons by [Icons8](https://icons8.com/)

---
10 changes: 10 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -1556,4 +1556,14 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```

---

### Third-Party Assets from Icons8

This application uses icon graphics provided by [Icons8](https://icons8.com/) under the free license, which requires attribution.
All Icons8 icons used in this application are © Icons8 and are subject to their [Terms of Use](https://icons8.com/license).

Icons8 attribution:
Icons by [Icons8](https://icons8.com/)

---
2 changes: 1 addition & 1 deletion Otrace/gui/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# from . import <filename>

from . import pycache
from . import pycache
168 changes: 43 additions & 125 deletions Otrace/gui/pycache.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
from tkinter import Tk, Canvas, Entry, Text, Button, PhotoImage, StringVar

import os

current_dir = os.path.dirname(os.path.abspath(__file__))
assets_path = os.path.join(current_dir, "assets", "pycache")

Expand All @@ -55,116 +56,60 @@ def relative_to_assets(path: str) -> Path:
window = Tk()

window.geometry("500x850")
window.configure(bg = "#383838")
window.configure(bg="#383838")


canvas = Canvas(
window,
bg = "#383838",
height = 850,
width = 500,
bd = 0,
highlightthickness = 0,
relief = "ridge"
bg="#383838",
height=850,
width=500,
bd=0,
highlightthickness=0,
relief="ridge",
)

canvas.place(x = 0, y = 0)
canvas.place(x=0, y=0)
canvas.create_rectangle(
498.0,
-1.99932861328125,
500.0,
850.0013427734375,
fill="#01D119",
outline="")
498.0, -1.99932861328125, 500.0, 850.0013427734375, fill="#01D119", outline=""
)

canvas.create_rectangle(
-1.1368683772161603e-13,
-2.0,
2.0,
850.0,
fill="#01D119",
outline="")
-1.1368683772161603e-13, -2.0, 2.0, 850.0, fill="#01D119", outline=""
)

canvas.create_rectangle(
-2.0,
0.125,
500.0,
2.125,
fill="#01D119",
outline="")
canvas.create_rectangle(-2.0, 0.125, 500.0, 2.125, fill="#01D119", outline="")

canvas.create_text(
12.0,
5.3125,
anchor="nw",
text="Settings",
fill="#01D119",
font=("Inter", 24 * -1)
12.0, 5.3125, anchor="nw", text="Settings", fill="#01D119", font=("Inter", 24 * -1)
)

image_close_icon = PhotoImage(
file=relative_to_assets("close_icon.png"))
close_icon = canvas.create_image(
479.0,
21.1875,
image=image_close_icon
)
image_close_icon = PhotoImage(file=relative_to_assets("close_icon.png"))
close_icon = canvas.create_image(479.0, 21.1875, image=image_close_icon)

canvas.create_rectangle(
-2.0,
40.5,
500.0,
42.5,
fill="#01D119",
outline="")
canvas.create_rectangle(-2.0, 40.5, 500.0, 42.5, fill="#01D119", outline="")

canvas.create_rectangle(
-2.0,
848.0,
500.0,
850.0,
fill="#01D119",
outline="")

image_intro_text = PhotoImage(
file=relative_to_assets("intro_text.png"))
intro_text = canvas.create_image(
256.0,
134.0,
image=image_intro_text
)
canvas.create_rectangle(-2.0, 848.0, 500.0, 850.0, fill="#01D119", outline="")

image_pro_box = PhotoImage(
file=relative_to_assets("pro_box.png"))
pro_box = canvas.create_image(
251.0,
318.3125,
image=image_pro_box
)
image_intro_text = PhotoImage(file=relative_to_assets("intro_text.png"))
intro_text = canvas.create_image(256.0, 134.0, image=image_intro_text)

image_contra_box = PhotoImage(
file=relative_to_assets("contra_box.png"))
contra_box = canvas.create_image(
250.0,
537.5,
image=image_contra_box
)
image_pro_box = PhotoImage(file=relative_to_assets("pro_box.png"))
pro_box = canvas.create_image(251.0, 318.3125, image=image_pro_box)

image_suggest_box = PhotoImage(
file=relative_to_assets("suggest_box.png"))
suggest_box = canvas.create_image(
249.0,
701.0,
image=image_suggest_box
)
image_contra_box = PhotoImage(file=relative_to_assets("contra_box.png"))
contra_box = canvas.create_image(250.0, 537.5, image=image_contra_box)

image_suggest_box = PhotoImage(file=relative_to_assets("suggest_box.png"))
suggest_box = canvas.create_image(249.0, 701.0, image=image_suggest_box)

canvas.create_text(
114.0,
447.4375,
anchor="nw",
text="A bit slower startup time as \nPython will need to recompile\nbytecode files\n\nMay not be necessary in \nproduction environments where \nstability is prioritized",
fill="#FFFFFF",
font=("Inter", 20 * -1)
font=("Inter", 20 * -1),
)

canvas.create_text(
Expand All @@ -173,7 +118,7 @@ def relative_to_assets(path: str) -> Path:
anchor="nw",
text="We recommend to disable it to prioritize\nfaster startup times",
fill="#FFFFFF",
font=("Inter", 20 * -1)
font=("Inter", 20 * -1),
)

canvas.create_text(
Expand All @@ -182,63 +127,36 @@ def relative_to_assets(path: str) -> Path:
anchor="nw",
text="Ensures a clean environment by \nremoving potentially outdated or \ncorrupted files\n\nUseful during development to \navoid issues caused by stale cache",
fill="#FFFFFF",
font=("Inter", 20 * -1)
font=("Inter", 20 * -1),
)

image_thumbs_down = PhotoImage(
file=relative_to_assets("thumbs_down.png"))
thumbs_down = canvas.create_image(
68.0,
537.0,
image=image_thumbs_down
)
image_thumbs_down = PhotoImage(file=relative_to_assets("thumbs_down.png"))
thumbs_down = canvas.create_image(68.0, 537.0, image=image_thumbs_down)

enable_button_image = PhotoImage(
file=relative_to_assets("enable_button.png"))
enable_button_image = PhotoImage(file=relative_to_assets("enable_button.png"))
enable_button = Button(
image=enable_button_image,
borderwidth=0,
highlightthickness=0,
command=lambda: print("enable_button clicked"),
relief="flat"
)
enable_button.place(
x=16.0,
y=771.0,
width=200.0,
height=53.0
relief="flat",
)
enable_button.place(x=16.0, y=771.0, width=200.0, height=53.0)

disable_button_image = PhotoImage(
file=relative_to_assets("disable_button.png"))
disable_button_image = PhotoImage(file=relative_to_assets("disable_button.png"))
disable_button = Button(
image=disable_button_image,
borderwidth=0,
highlightthickness=0,
command=lambda: print("disable_button clicked"),
relief="flat"
)
disable_button.place(
x=280.0,
y=771.0,
width=200.0,
height=53.0
relief="flat",
)
disable_button.place(x=280.0, y=771.0, width=200.0, height=53.0)

image_settings_icon = PhotoImage(
file=relative_to_assets("settings_icon.png"))
settings_icon = canvas.create_image(
128.0,
20.0,
image=image_settings_icon
)
image_settings_icon = PhotoImage(file=relative_to_assets("settings_icon.png"))
settings_icon = canvas.create_image(128.0, 20.0, image=image_settings_icon)

image_thumbs_up = PhotoImage(
file=relative_to_assets("thumbs_up.png"))
thumbs_up = canvas.create_image(
67.0,
320.0,
image=image_thumbs_up
)
image_thumbs_up = PhotoImage(file=relative_to_assets("thumbs_up.png"))
thumbs_up = canvas.create_image(67.0, 320.0, image=image_thumbs_up)
window.resizable(False, False)
window.mainloop()