From d235fa693e78dadd2c6d8b9ebd117a3a8748ede9 Mon Sep 17 00:00:00 2001 From: PhatPhuckDave Date: Tue, 16 Sep 2025 09:36:49 +0200 Subject: [PATCH] Update filename display logic and improve video editor behavior: increase filename length limit and adjust text rendering properties. Maintain project view when switching to video editor, enhancing user interface fluidity. --- croppa/main.py | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/croppa/main.py b/croppa/main.py index 017768a..bb22129 100644 --- a/croppa/main.py +++ b/croppa/main.py @@ -210,12 +210,12 @@ class ProjectView: # Draw filename filename = video_path.name # Truncate if too long - if len(filename) > 20: - filename = filename[:17] + "..." + if len(filename) > 25: + filename = filename[:22] + "..." text_y = progress_y + self.PROGRESS_BAR_HEIGHT + 20 cv2.putText(canvas, filename, (x, text_y), - cv2.FONT_HERSHEY_SIMPLEX, 0.5, self.TEXT_COLOR, 1) + cv2.FONT_HERSHEY_SIMPLEX, 0.6, self.TEXT_COLOR, 2) # Draw progress percentage if video_path in self.progress_data: @@ -1143,10 +1143,6 @@ class VideoEditor: # Save current state before switching self.save_state() - # Switch back to editor mode first - self.project_view_mode = False - self.project_view = None - # Find the video in our video_files list try: video_index = self.video_files.index(video_path) @@ -1167,9 +1163,10 @@ class VideoEditor: print(f"Opened video: {video_path.name}") else: print(f"Could not find video: {video_path.name}") - # Re-enable project view if we couldn't open the video - self.project_view_mode = True - self.project_view = ProjectView(video_path.parent, self) + return + + # Keep project view open but switch focus to video editor + # Don't destroy the project view window - just let the user switch between them def draw_feedback_message(self, frame): """Draw feedback message on frame if visible"""