Compare commits

..

No commits in common. "d589700d7a9e77f1869585cd24227278cae5aff1" and "60b9d4038b9d347eca2f947dadc7b9f8bd59e1a7" have entirely different histories.

2 changed files with 20 additions and 2188 deletions

File diff suppressed because it is too large Load Diff

View File

@ -239,8 +239,8 @@ class ShortsEditorGUI:
# If parent exists, create as child window; otherwise create root window
self.editor_window = tk.Toplevel(self.parent) if self.parent else tk.Tk()
self.editor_window.title("Professional Shorts Editor")
self.editor_window.geometry("1200x900") # Increased height for Audio 2 visibility
self.editor_window.minsize(900, 700) # Increased minimum size
self.editor_window.geometry("1200x800") # Optimal size for video editing
self.editor_window.minsize(900, 600) # Minimum usable size
self.editor_window.configure(bg=self.colors['bg_primary']) # Apply dark theme
# Configure responsive layout for window resizing
@ -340,14 +340,14 @@ class ShortsEditorGUI:
# Professional Timeline Workspace - Multi-track editing environment
# Fixed height prevents timeline from shrinking when window is resized
# This is where users perform the majority of their editing work
timeline_workspace = tk.Frame(player_frame, bg=self.colors['bg_secondary'], height=480)
timeline_workspace = tk.Frame(player_frame, bg=self.colors['bg_secondary'], height=380)
timeline_workspace.grid(row=1, column=0, sticky="ew", padx=15, pady=(0, 15))
timeline_workspace.pack_propagate(False) # Maintain fixed height for consistent layout
# Timeline header - contains editing mode controls and timeline options
# These controls affect how the user interacts with timeline elements
header_frame = tk.Frame(timeline_workspace, bg=self.colors['bg_secondary'])
header_frame.pack(fill="x", pady=(5, 5))
header_frame.pack(fill="x", pady=(10, 5))
# Left side timeline controls - editing modes and interaction options
left_controls = tk.Frame(header_frame, bg=self.colors['bg_secondary'])
@ -450,24 +450,19 @@ class ShortsEditorGUI:
canvas_frame = tk.Frame(timeline_container, bg=self.colors['bg_tertiary'])
canvas_frame.pack(side="right", fill="both", expand=True)
# Create canvas without internal scrollbars
# Create canvas with scrollbars
self.timeline_canvas = tk.Canvas(canvas_frame, bg='#1a1a1a',
highlightthickness=0, scrollregion=(0, 0, 2000, 400))
# Pack canvas to fill the frame completely
self.timeline_canvas.pack(fill="both", expand=True)
# Scrollbars
h_scrollbar = ttk.Scrollbar(canvas_frame, orient="horizontal", command=self.timeline_canvas.xview)
v_scrollbar = ttk.Scrollbar(canvas_frame, orient="vertical", command=self.sync_vertical_scroll)
self.timeline_canvas.configure(xscrollcommand=h_scrollbar.set, yscrollcommand=v_scrollbar.set)
# Create external horizontal scrollbar for timeline control
# Place it outside the timeline in the workspace area
external_scrollbar_frame = tk.Frame(timeline_workspace, bg=self.colors['bg_primary'], height=20)
external_scrollbar_frame.pack(side="bottom", fill="x", padx=5, pady=2)
external_scrollbar_frame.pack_propagate(False)
# Horizontal scrollbar outside timeline but controlling it
self.external_h_scrollbar = ttk.Scrollbar(external_scrollbar_frame, orient="horizontal",
command=self.timeline_canvas.xview)
self.timeline_canvas.configure(xscrollcommand=self.external_h_scrollbar.set)
self.external_h_scrollbar.pack(fill="x", expand=True)
# Pack scrollbars and canvas
h_scrollbar.pack(side="bottom", fill="x")
v_scrollbar.pack(side="right", fill="y")
self.timeline_canvas.pack(side="left", fill="both", expand=True)
# Bind professional timeline events
self.timeline_canvas.bind("<Button-1>", self.timeline_click)
@ -614,13 +609,13 @@ class ShortsEditorGUI:
# Bottom line of track
self.track_road_canvas.create_line(
0, y_pos + track_height, canvas_width, y_pos + track_height,
fill=self.colors['border'], width=3, tags="road_lines"
fill=self.colors['border'], width=1, tags="road_lines"
)
# Track type indicator line (left edge with track color)
self.track_road_canvas.create_line(
0, y_pos, 0, y_pos + track_height,
fill=track_info['color'], width=1, tags="road_lines"
fill=track_info['color'], width=3, tags="road_lines"
)
# Center dashed line for alignment reference
@ -639,9 +634,11 @@ class ShortsEditorGUI:
self.editor_window.after(10, self.draw_track_road_lines)
def sync_vertical_scroll(self, *args):
"""Vertical scrolling disabled - no scrollbars for up/down movement"""
# Vertical scrolling removed for cleaner interface
pass
"""Synchronize vertical scrolling between track panel and timeline canvas"""
# Scroll both canvases together
self.timeline_canvas.yview(*args)
if hasattr(self, 'track_road_canvas'):
self.track_road_canvas.yview(*args)
def create_track_control(self, track_id, track_info):
"""Create control panel for a single track positioned on road lines"""