Skip to content

Commit

Permalink
Use get_prop in STATUS_FRAME_PROP
Browse files Browse the repository at this point in the history
  • Loading branch information
Setsugennoao committed Oct 20, 2023
1 parent c46019d commit 0148c39
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vspreview/main/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from PyQt6.QtGui import QCloseEvent, QColorSpace, QKeySequence, QMoveEvent, QShortcut, QShowEvent
from PyQt6.QtWidgets import QApplication, QLabel, QMainWindow, QSizePolicy, QSplitter, QTabWidget
from vsengine import vpy # type: ignore
from vstools import get_prop

from ..core import (
PRELOADED_MODULES, AbstractQItem, CroppingInfo, DragNavigator, ExtendedWidget, Frame, GraphicsImageItem,
Expand Down Expand Up @@ -91,7 +92,7 @@ class MainWindow(AbstractQItem, QMainWindow, QAbstractYAMLObjectSingleton):

# status bar
def STATUS_FRAME_PROP(self, prop: Any) -> str:
return 'Type: %s' % (prop['_PictType'].decode('utf-8') if '_PictType' in prop else '?')
return f"Type: {get_prop(prop, '_PictType', str, None, '?')}"

EVENT_POLICY = QSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Expanding)

Expand Down

0 comments on commit 0148c39

Please sign in to comment.