diff --git a/croppa/main.py b/croppa/main.py index ad40cca..8a7d97d 100644 --- a/croppa/main.py +++ b/croppa/main.py @@ -2906,6 +2906,18 @@ class VideoEditor: # Center the frame on canvas frame_height, frame_width = display_frame.shape[:2] available_height = self.window_height - (0 if self.is_image_mode else self.TIMELINE_HEIGHT) + + # Simple fullscreen fix: scale down if video is too large for screen + if self.is_fullscreen and (frame_height > available_height or frame_width > self.window_width): + scale_x = self.window_width / frame_width + scale_y = available_height / frame_height + scale = min(scale_x, scale_y) + if scale < 1.0: + new_width = int(frame_width * scale) + new_height = int(frame_height * scale) + display_frame = cv2.resize(display_frame, (new_width, new_height), interpolation=cv2.INTER_LINEAR) + frame_height, frame_width = display_frame.shape[:2] + start_y = (available_height - frame_height) // 2 start_x = (self.window_width - frame_width) // 2