Skip to content

Commit

Permalink
v0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Jam-Burger committed Jan 28, 2022
1 parent d517b84 commit 8479458
Show file tree
Hide file tree
Showing 7 changed files with 222 additions and 104 deletions.
3 changes: 0 additions & 3 deletions TempCode.py

This file was deleted.

Binary file removed __pycache__/design.cpython-310.pyc
Binary file not shown.
Binary file removed __pycache__/functions.cpython-310.pyc
Binary file not shown.
Binary file removed __pycache__/resources.cpython-310.pyc
Binary file not shown.
11 changes: 6 additions & 5 deletions design.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,13 @@ def __init__(self, master, row, column, text, data1, data2):
class Slider:
def __init__(self, master, row, length, label, update_command, release_command):
self.scale = Scale(master, label=label, command=update_command, orient=HORIZONTAL, from_=-50, to=50,
showvalue=False, length=length, font=('Consolas', 11), bg=color_1, fg=color_2)
self.scale.grid(row=row, column=0, pady=(20, 0), columnspan=4)
showvalue=False, length=length, font=('Consolas', 11), bg=color_1, fg=color_2)
self.scale.grid(row=row, column=0, pady=(0, 15), columnspan=4)
self.scale.bind('<ButtonRelease 1>', release_command)
sliders.append(self.scale)


class Line:
def __init__(self, master, row):
Label(master, text = "-"*50, font = ('Consolas', 11), bg = color_1,
fg = color_2).grid(row = row, column = 0, columnspan = 4)
def __init__(self, master, row, pady=(0, 0)):
Label(master, text="-"*50, font=('Consolas', 11), bg=color_1,
fg=color_2).grid(row=row, column=0, columnspan=4, pady=pady)
20 changes: 15 additions & 5 deletions editor.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from tkinter import *
from tkinter import ttk
from PIL import Image
from pip import main

Expand Down Expand Up @@ -77,13 +78,13 @@
color_2 = design.color_2

middle_frame_height = height*.15
middle_frame = Frame(root, border=3, borderwidth=5, bg=color_1,
pady=10, width=main_frame_width, height=middle_frame_height, relief=RIDGE)
middle_frame = Frame(root, height=middle_frame_height, border=3, borderwidth=5, bg=color_1,
pady=10, width=main_frame_width, relief=RIDGE)
middle_frame.grid(row=1, column=1, padx=10, pady=(
10, 0), ipadx=5, ipady=5, sticky=N)

main_frame = Frame(root, border=3, borderwidth=5, bg=color_1,
pady=20, width=main_frame_width, height=height - 340 - middle_frame_height, relief=RIDGE)
main_frame = Frame(root, height=height - 340 - middle_frame_height, border=3, borderwidth=5, bg=color_1,
pady=10, width=main_frame_width, relief=RIDGE)
main_frame.grid(row=2, column=1, padx=10, pady=(5, 0))

# importing images
Expand Down Expand Up @@ -138,7 +139,7 @@
LabeledButton(main_frame, 2, 2, my_images.effects_img, 'Effects', fns.effects)
LabeledButton(main_frame, 2, 3, my_images.add_img, 'Add Image', fns.add_img)

Line(main_frame, 3)
Line(main_frame, 3, pady=(0, 10))

brightness_slider = Slider(main_frame, 4, main_frame_width*.7,
'Brightness', fns.update_brightness, fns.apply_enhance)
Expand All @@ -149,6 +150,15 @@
color_slider = Slider(main_frame, 7, main_frame_width*.7,
'Color', fns.update_color, fns.apply_enhance)

Line(main_frame, 8)

status = Label(main_frame, bg=color_1, text='----Status----',
fg=color_2, font=('Consolas bold', 10))
status.grid(row=9, column=0, columnspan=4)
if fns.current_img is None:
status.configure(text="Open a new image")

fns.set_status(status)
# setting every frame non-resizable
for w in root.winfo_children():
w.grid_propagate(0)
Expand Down
Loading

0 comments on commit 8479458

Please sign in to comment.