Skip to content

Commit

Permalink
Merge pull request #9 from NTGNguyen/auto/pre-commit-fix
Browse files Browse the repository at this point in the history
🎨 Auto Code Fix (Pre-commit)
  • Loading branch information
NTGNguyen authored Sep 9, 2024
2 parents 21d1cab + 0da37cb commit 98a71ba
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
11 changes: 6 additions & 5 deletions src/GUI/screen/button.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
"""Some Button Classes using in the python GUI"""
import tkinter as tk

from src.constants import START_BUTTON_TEXT


class ButtonInFrame2(tk.Button):
"""Button using in frame 2
Args:
tk (Button): The Button modules in tkinter
"""
def __init__(self,text,controller,action):
super().__init__(controller,text=text, command=action)

def __init__(self, text, controller, action):
super().__init__(controller, text=text, command=action)
self.pack(side=tk.TOP, padx=5)


class StartButton(tk.Button):
"""The Start Button class heritant from Button in tk Modules
Expand All @@ -35,6 +39,3 @@ def __init__(self, parent, controller, target_frame):

def on_click(self):
self.controller.show_frame(self.target_frame)



5 changes: 2 additions & 3 deletions src/GUI/screen/main_page.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
from src.constants import DRAW_POINTS_TEXT, NEXT_STEP_BUTTON_TEXT
import tkinter as tk
from tkinter import messagebox

from src.constants import DRAW_POINTS_TEXT, NEXT_STEP_BUTTON_TEXT
from src.GUI.coordinate_system.coordinate_system import CoordinateSystem

from .form_frame import FormFrame

from .button import ButtonInFrame2
from .form_frame import FormFrame


class MainPage(tk.Frame):
Expand Down
2 changes: 1 addition & 1 deletion src/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
WINDOW_WIDTH = 1000
WINDOW_HEIGHT = 600
START_BUTTON_TEXT = "Start"
NEXT_STEP_BUTTON_TEXT ="Next Step"
NEXT_STEP_BUTTON_TEXT = "Next Step"
DRAW_POINTS_TEXT = "Draw Points"
RED = 'red'
BLUE = 'blue'
Expand Down

0 comments on commit 98a71ba

Please sign in to comment.