Compare commits
2 Commits
efa10bfce3
...
a6886a8ab8
Author | SHA1 | Date | |
---|---|---|---|
a6886a8ab8 | |||
4d4cba9876 |
@@ -123,6 +123,9 @@ class VideoEditor:
|
||||
# Display offset for panning when zoomed
|
||||
self.display_offset = [0, 0]
|
||||
|
||||
# Fullscreen state
|
||||
self.is_fullscreen = False
|
||||
|
||||
# Progress bar state
|
||||
self.progress_bar_visible = False
|
||||
self.progress_bar_progress = 0.0 # 0.0 to 1.0
|
||||
@@ -478,11 +481,13 @@ class VideoEditor:
|
||||
|
||||
def next_video(self):
|
||||
"""Switch to the next video"""
|
||||
self.save_state() # Save current video state before switching
|
||||
next_index = (self.current_video_index + 1) % len(self.video_files)
|
||||
self.switch_to_video(next_index)
|
||||
|
||||
def previous_video(self):
|
||||
"""Switch to the previous video"""
|
||||
self.save_state() # Save current video state before switching
|
||||
prev_index = (self.current_video_index - 1) % len(self.video_files)
|
||||
self.switch_to_video(prev_index)
|
||||
|
||||
@@ -764,6 +769,24 @@ class VideoEditor:
|
||||
self.feedback_message_time = time.time()
|
||||
self.display_needs_update = True
|
||||
|
||||
def toggle_fullscreen(self):
|
||||
"""Toggle between windowed and fullscreen mode"""
|
||||
window_title = "Image Editor" if self.is_image_mode else "Video Editor"
|
||||
|
||||
if self.is_fullscreen:
|
||||
# Switch to windowed mode
|
||||
self.is_fullscreen = False
|
||||
cv2.setWindowProperty(window_title, cv2.WND_PROP_FULLSCREEN, cv2.WINDOW_NORMAL)
|
||||
cv2.resizeWindow(window_title, 1200, 800)
|
||||
print("Switched to windowed mode")
|
||||
else:
|
||||
# Switch to fullscreen mode
|
||||
self.is_fullscreen = True
|
||||
cv2.setWindowProperty(window_title, cv2.WND_PROP_FULLSCREEN, cv2.WINDOW_FULLSCREEN)
|
||||
print("Switched to fullscreen mode")
|
||||
|
||||
self.display_needs_update = True
|
||||
|
||||
def draw_feedback_message(self, frame):
|
||||
"""Draw feedback message on frame if visible"""
|
||||
if not self.feedback_message or not self.feedback_message_time:
|
||||
@@ -1927,6 +1950,7 @@ class VideoEditor:
|
||||
print("Other Controls:")
|
||||
print(" Ctrl+Scroll: Zoom in/out")
|
||||
print(" Shift+S: Save screenshot")
|
||||
print(" f: Toggle fullscreen")
|
||||
if len(self.video_files) > 1:
|
||||
print(" N: Next file")
|
||||
print(" n: Previous file")
|
||||
@@ -1956,6 +1980,7 @@ class VideoEditor:
|
||||
print("Other Controls:")
|
||||
print(" Ctrl+Scroll: Zoom in/out")
|
||||
print(" Shift+S: Save screenshot")
|
||||
print(" f: Toggle fullscreen")
|
||||
print(" 1: Set cut start point")
|
||||
print(" 2: Set cut end point")
|
||||
print(" T: Toggle loop between markers")
|
||||
@@ -2040,6 +2065,8 @@ class VideoEditor:
|
||||
elif key == ord("-") or key == ord("_"):
|
||||
self.rotate_clockwise()
|
||||
print(f"Rotated to {self.rotation_angle}°")
|
||||
elif key == ord("f"):
|
||||
self.toggle_fullscreen()
|
||||
elif key == ord("s"): # Shift+S - Save screenshot
|
||||
self.save_current_frame()
|
||||
elif key == ord("W"):
|
||||
|
Reference in New Issue
Block a user