Skip to content

Commit

Permalink
IMPROVEMENT: Component editor add text explaining usage.
Browse files Browse the repository at this point in the history
  • Loading branch information
amilcarlucas committed May 14, 2024
1 parent bb9bef1 commit 1ad831d
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions MethodicConfigurator/frontend_tkinter_component_editor_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,22 @@ def __init__(self, version, local_filesystem: LocalFilesystem=None):

self.entry_widgets = {} # Dictionary for entry widgets

self.main_frame = ttk.Frame(self.root)
self.main_frame.pack(side=tk.TOP, fill="x", expand=False, pady=(4, 0)) # Pack the frame at the top of the window
main_frame = ttk.Frame(self.root)
main_frame.pack(side=tk.TOP, fill="x", expand=False, pady=(4, 0)) # Pack the frame at the top of the window

explanation_text = "Please configure ALL vehicle component properties in this window.\n"
explanation_text += "Scroll down and make sure you do not miss a property.\n"
explanation_text += "Saving the result will write to the vehicle_components.json file."
explanation_label = tk.Label(main_frame, text=explanation_text, wraplength=800, justify=tk.LEFT)
explanation_label.pack(side=tk.LEFT, padx=(10, 10), pady=(10, 0), anchor=tk.NW)

# Load the vehicle image and scale it down to image_height pixels in height
if local_filesystem.vehicle_image_exists():
image_label = self.put_image_in_label(self.main_frame, local_filesystem.vehicle_image_filepath(), 100)
image_label = self.put_image_in_label(main_frame, local_filesystem.vehicle_image_filepath(), 100)
image_label.pack(side=tk.RIGHT, anchor=tk.NE, padx=(4, 4), pady=(4, 0))
show_tooltip(image_label, "Replace the vehicle.jpg file in the vehicle directory to change the vehicle image.")
else:
image_label = tk.Label(self.main_frame, text="No vehicle.jpg image file found on the vehicle directory.")
image_label = tk.Label(main_frame, text="No vehicle.jpg image file found on the vehicle directory.")
image_label.pack(side=tk.RIGHT, anchor=tk.NE, padx=(4, 4), pady=(4, 0))

self.scroll_frame = ScrollFrame(self.root)
Expand Down

0 comments on commit 1ad831d

Please sign in to comment.