Skip to content

Move to typed enums from QtCore.Qt #5548

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 33 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
e118735
refactor: Use typed enum AlignmentFlag
Vekhir Jun 25, 2024
d763aae
refactor: Use typed enum ApplicationAttribute
Vekhir Jun 25, 2024
8392725
refactor: Use typed enum AspectRatioMode
Vekhir Jun 25, 2024
665eafb
refactor: Use typed enum CaseSensitivity
Vekhir Jun 25, 2024
91bbae0
refactor: Use typed enum CheckState
Vekhir Jun 25, 2024
6a6a222
refactor: Use typed enum ClipOperation
Vekhir Jun 25, 2024
18f187c
refactor: Use typed enum ConnectionType
Vekhir Jun 25, 2024
3fe04a5
refactor: Use typed enum Corner
Vekhir Jun 25, 2024
6b7fe0c
refactor: Use typed enum CursorShape
Vekhir Jun 25, 2024
30b433e
refactor: Use typed enum DockWidgetArea
Vekhir Jun 25, 2024
a8d7644
refactor: Use typed enum DropAction
Vekhir Jun 25, 2024
2f0b8a3
refactor: Use typed enum FillRule
Vekhir Jun 25, 2024
a495ef2
refactor: Use typed enum FocusPolicy
Vekhir Jun 25, 2024
249b6b4
refactor: Use typed enum GlobalColor
Vekhir Jun 25, 2024
5d33665
refactor: Use typed enum ItemDataRole
Vekhir Jun 25, 2024
f51542c
refactor: Use typed enum ItemFlag
Vekhir Jun 25, 2024
320e6c7
refactor: Use typed enum Key
Vekhir Jun 25, 2024
cc3d17a
refactor: Use typed enum KeyboardModifier
Vekhir Jun 25, 2024
b1f48d2
refactor: Use typed enum MouseButton
Vekhir Jun 25, 2024
809fed7
refactor: Use typed enum Orientation
Vekhir Jun 25, 2024
ecadca8
refactor: Use typed enum PenStyle
Vekhir Jun 25, 2024
4997188
refactor: Use typed enum ScrollBarAsNeeded
Vekhir Jun 25, 2024
97a318d
refactor: Use typed enum ShortcutContext
Vekhir Jun 25, 2024
b9f97ad
refactor: Use typed enum SizeMode
Vekhir Jun 25, 2024
cc3dd83
refactor: Use typed enum SortOrder
Vekhir Jun 25, 2024
4878954
refactor: Use typed enum TextElideMode
Vekhir Jun 25, 2024
8d0df3d
refactor: Use typed enum TextFormat
Vekhir Jun 25, 2024
8bfcf49
refactor: Use typed enum TextInteractionFlag
Vekhir Jun 25, 2024
c15b210
refactor: Use typed enum ToolButtonStyle
Vekhir Jun 25, 2024
632ea76
refactor: Use typed enum TransformationMode
Vekhir Jun 25, 2024
1f29245
refactor: Use typed enum WidgetAttribute
Vekhir Jun 25, 2024
a505ba3
refactor: Use typed enum WindowState
Vekhir Jun 25, 2024
60ea2f2
refactor: Use typed enum WindowType
Vekhir Jun 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/classes/ui_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,15 @@ def get_default_icon(theme_name):

def make_dark_palette(darkPalette: QPalette) -> QPalette:
darkPalette.setColor(QPalette.Window, QColor(53, 53, 53))
darkPalette.setColor(QPalette.WindowText, Qt.white)
darkPalette.setColor(QPalette.WindowText, Qt.GlobalColor.white)
darkPalette.setColor(QPalette.Base, QColor(25, 25, 25))
darkPalette.setColor(QPalette.AlternateBase, QColor(53, 53, 53))
darkPalette.setColor(QPalette.Light, QColor(68, 68, 68))
darkPalette.setColor(QPalette.Text, Qt.white)
darkPalette.setColor(QPalette.Text, Qt.GlobalColor.white)
darkPalette.setColor(QPalette.Button, QColor(53, 53, 53))
darkPalette.setColor(QPalette.ButtonText, Qt.white)
darkPalette.setColor(QPalette.ButtonText, Qt.GlobalColor.white)
darkPalette.setColor(QPalette.Highlight, QColor(42, 130, 218, 192))
darkPalette.setColor(QPalette.HighlightedText, Qt.black)
darkPalette.setColor(QPalette.HighlightedText, Qt.GlobalColor.black)
#
# Disabled palette
#
Expand All @@ -125,11 +125,11 @@ def make_dark_palette(darkPalette: QPalette) -> QPalette:
darkPalette.setColor(QPalette.Disabled, QPalette.Button, QColor(53, 53, 53, 128))
darkPalette.setColor(QPalette.Disabled, QPalette.ButtonText, QColor(255, 255, 255, 128))
darkPalette.setColor(QPalette.Disabled, QPalette.Highlight, QColor(151, 151, 151, 192))
darkPalette.setColor(QPalette.Disabled, QPalette.HighlightedText, Qt.black)
darkPalette.setColor(QPalette.Disabled, QPalette.HighlightedText, Qt.GlobalColor.black)

# Tooltips
darkPalette.setColor(QPalette.ToolTipBase, QColor(42, 130, 218))
darkPalette.setColor(QPalette.ToolTipText, Qt.white)
darkPalette.setColor(QPalette.ToolTipText, Qt.GlobalColor.white)
# Links
darkPalette.setColor(QPalette.Link, QColor(85, 170, 255))
darkPalette.setColor(QPalette.LinkVisited, QColor(136, 85, 255))
Expand Down
2 changes: 1 addition & 1 deletion src/classes/waveform.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def getAudioData(file, channel=-1, tid=None):
return

# Show waiting cursor
get_app().setOverrideCursor(QCursor(Qt.WaitCursor))
get_app().setOverrideCursor(QCursor(Qt.CursorShape.WaitCursor))

# Extract audio waveform data (for all channels)
# Use max RMS (root mean squared) value for each sample
Expand Down
6 changes: 3 additions & 3 deletions src/launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
try:
# This apparently has to be done before loading QtQuick
# (via QtWebEgine) AND before creating the QApplication instance
QApplication.setAttribute(Qt.AA_ShareOpenGLContexts)
QApplication.setAttribute(Qt.ApplicationAttribute.AA_ShareOpenGLContexts)
from OpenGL import GL # noqa
except (ImportError, AttributeError):
pass
Expand All @@ -78,8 +78,8 @@
os.environ['QT_SCALE_FACTOR_ROUNDING_POLICY'] = "Round"

# Enable High-DPI resolutions
QApplication.setAttribute(Qt.AA_EnableHighDpiScaling)
QApplication.setAttribute(Qt.AA_UseHighDpiPixmaps)
QApplication.setAttribute(Qt.ApplicationAttribute.AA_EnableHighDpiScaling)
QApplication.setAttribute(Qt.ApplicationAttribute.AA_UseHighDpiPixmaps)
except AttributeError:
pass # Quietly fail for older Qt5 versions

Expand Down
46 changes: 23 additions & 23 deletions src/themes/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def create_svg_icon(self, svg_path, size):
"""Create Dynamic High DPI icons"""
renderer = QSvgRenderer(svg_path)
image = QPixmap(size * self.app.devicePixelRatio())
image.fill(Qt.transparent)
image.fill(Qt.GlobalColor.transparent)
painter = QPainter(image)
renderer.render(painter)
painter.end()
Expand Down Expand Up @@ -188,36 +188,36 @@ def apply_theme(self):
self.set_dock_margins()

# Move tabs to bottom
self.app.window.setTabPosition(Qt.TopDockWidgetArea, QTabWidget.South)
self.app.window.setTabPosition(Qt.DockWidgetArea.TopDockWidgetArea, QTabWidget.South)

# Main toolbar buttons
toolbar_buttons = [
{"action": self.app.window.actionNew, "style": Qt.ToolButtonIconOnly},
{"action": self.app.window.actionOpen, "style": Qt.ToolButtonIconOnly},
{"action": self.app.window.actionSave, "style": Qt.ToolButtonIconOnly},
{"action": self.app.window.actionNew, "style": Qt.ToolButtonStyle.ToolButtonIconOnly},
{"action": self.app.window.actionOpen, "style": Qt.ToolButtonStyle.ToolButtonIconOnly},
{"action": self.app.window.actionSave, "style": Qt.ToolButtonStyle.ToolButtonIconOnly},
{"divide": True},
{"action": self.app.window.actionUndo, "style": Qt.ToolButtonIconOnly},
{"action": self.app.window.actionRedo, "style": Qt.ToolButtonIconOnly},
{"action": self.app.window.actionUndo, "style": Qt.ToolButtonStyle.ToolButtonIconOnly},
{"action": self.app.window.actionRedo, "style": Qt.ToolButtonStyle.ToolButtonIconOnly},
{"divide": True},
{"action": self.app.window.actionImportFiles, "style": Qt.ToolButtonIconOnly},
{"action": self.app.window.actionProfile, "style": Qt.ToolButtonIconOnly},
{"action": self.app.window.actionFullscreen, "style": Qt.ToolButtonIconOnly},
{"action": self.app.window.actionImportFiles, "style": Qt.ToolButtonStyle.ToolButtonIconOnly},
{"action": self.app.window.actionProfile, "style": Qt.ToolButtonStyle.ToolButtonIconOnly},
{"action": self.app.window.actionFullscreen, "style": Qt.ToolButtonStyle.ToolButtonIconOnly},
{"divide": True},
{"action": self.app.window.actionExportVideo, "style": Qt.ToolButtonIconOnly},
{"action": self.app.window.actionExportVideo, "style": Qt.ToolButtonStyle.ToolButtonIconOnly},
]
self.set_toolbar_buttons(self.app.window.toolBar, icon_size=24, settings=toolbar_buttons)

# Timeline toolbar buttons
timeline_buttons = [
{"action": self.app.window.actionAddTrack, "style": Qt.ToolButtonIconOnly},
{"action": self.app.window.actionAddTrack, "style": Qt.ToolButtonStyle.ToolButtonIconOnly},
{"divide": True},
{"action": self.app.window.actionSnappingTool, "style": Qt.ToolButtonIconOnly, "icon": ":/icons/Humanity/actions/custom/snap.svg"},
{"action": self.app.window.actionRazorTool, "style": Qt.ToolButtonIconOnly, "icon": ":/icons/Humanity/actions/16/edit-cut.svg"},
{"action": self.app.window.actionSnappingTool, "style": Qt.ToolButtonStyle.ToolButtonIconOnly, "icon": ":/icons/Humanity/actions/custom/snap.svg"},
{"action": self.app.window.actionRazorTool, "style": Qt.ToolButtonStyle.ToolButtonIconOnly, "icon": ":/icons/Humanity/actions/16/edit-cut.svg"},
{"divide": True},
{"action": self.app.window.actionAddMarker, "style": Qt.ToolButtonIconOnly, "icon": ":/icons/actions/add_marker.svg"},
{"action": self.app.window.actionPreviousMarker, "style": Qt.ToolButtonIconOnly},
{"action": self.app.window.actionNextMarker, "style": Qt.ToolButtonIconOnly},
{"action": self.app.window.actionCenterOnPlayhead, "style": Qt.ToolButtonIconOnly, "icon": ":/icons/Humanity/actions/custom/center-on-playhead.svg"},
{"action": self.app.window.actionAddMarker, "style": Qt.ToolButtonStyle.ToolButtonIconOnly, "icon": ":/icons/actions/add_marker.svg"},
{"action": self.app.window.actionPreviousMarker, "style": Qt.ToolButtonStyle.ToolButtonIconOnly},
{"action": self.app.window.actionNextMarker, "style": Qt.ToolButtonStyle.ToolButtonIconOnly},
{"action": self.app.window.actionCenterOnPlayhead, "style": Qt.ToolButtonStyle.ToolButtonIconOnly, "icon": ":/icons/Humanity/actions/custom/center-on-playhead.svg"},
{"divide": True},
{"widget": self.app.window.sliderZoomWidget}
]
Expand All @@ -226,11 +226,11 @@ def apply_theme(self):
# Video toolbar
toolbar_buttons = [
{"expand": True},
{"action": self.app.window.actionJumpStart, "style": Qt.ToolButtonIconOnly},
{"action": self.app.window.actionRewind, "style": Qt.ToolButtonIconOnly},
{"action": self.app.window.actionPlay, "style": Qt.ToolButtonIconOnly},
{"action": self.app.window.actionFastForward, "style": Qt.ToolButtonIconOnly},
{"action": self.app.window.actionJumpEnd, "style": Qt.ToolButtonIconOnly},
{"action": self.app.window.actionJumpStart, "style": Qt.ToolButtonStyle.ToolButtonIconOnly},
{"action": self.app.window.actionRewind, "style": Qt.ToolButtonStyle.ToolButtonIconOnly},
{"action": self.app.window.actionPlay, "style": Qt.ToolButtonStyle.ToolButtonIconOnly},
{"action": self.app.window.actionFastForward, "style": Qt.ToolButtonStyle.ToolButtonIconOnly},
{"action": self.app.window.actionJumpEnd, "style": Qt.ToolButtonStyle.ToolButtonIconOnly},
{"expand": True}
]
self.set_toolbar_buttons(self.app.window.videoToolbar, icon_size=24, settings=toolbar_buttons)
Expand Down
44 changes: 22 additions & 22 deletions src/themes/cosmic/theme.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ def apply_theme(self):
self.app.setFont(font)

# Move tabs to top
self.app.window.setTabPosition(Qt.TopDockWidgetArea, QTabWidget.North)
self.app.window.setTabPosition(Qt.DockWidgetArea.TopDockWidgetArea, QTabWidget.North)

# Set dock widget content margins to 0
self.set_dock_margins([16, 0, 16, 0])
Expand All @@ -494,28 +494,28 @@ def apply_theme(self):

# Main toolbar buttons
toolbar_buttons = [
{"action": self.app.window.actionNew, "icon": "themes/cosmic/images/tool-new-project.svg", "style": Qt.ToolButtonTextBesideIcon},
{"action": self.app.window.actionOpen, "icon": "themes/cosmic/images/tool-open-project.svg", "style": Qt.ToolButtonTextBesideIcon},
{"action": self.app.window.actionImportFiles, "icon": "themes/cosmic/images/tool-import-files.svg", "style": Qt.ToolButtonTextBesideIcon},
{"action": self.app.window.actionProfile, "icon": "themes/cosmic/images/tool-profile.svg", "style": Qt.ToolButtonTextBesideIcon},
{"action": self.app.window.actionNew, "icon": "themes/cosmic/images/tool-new-project.svg", "style": Qt.ToolButtonStyle.ToolButtonTextBesideIcon},
{"action": self.app.window.actionOpen, "icon": "themes/cosmic/images/tool-open-project.svg", "style": Qt.ToolButtonStyle.ToolButtonTextBesideIcon},
{"action": self.app.window.actionImportFiles, "icon": "themes/cosmic/images/tool-import-files.svg", "style": Qt.ToolButtonStyle.ToolButtonTextBesideIcon},
{"action": self.app.window.actionProfile, "icon": "themes/cosmic/images/tool-profile.svg", "style": Qt.ToolButtonStyle.ToolButtonTextBesideIcon},
{"expand": True},
{"action": self.app.window.actionSave, "icon": "themes/cosmic/images/tool-save-project.svg", "style": Qt.ToolButtonTextBesideIcon},
{"action": self.app.window.actionExportVideo, "icon": "themes/cosmic/images/tool-export.svg", "style": Qt.ToolButtonTextBesideIcon, "stylesheet": "QToolButton { background-color: #0078FF; color: #FFFFFF; }"},
{"action": self.app.window.actionUpdate, "icon": "themes/cosmic/images/warning.svg", "visible": False, "style": Qt.ToolButtonTextBesideIcon, "stylesheet": "QToolButton { background-color: #141923; color: #FABE0A; }"}
{"action": self.app.window.actionSave, "icon": "themes/cosmic/images/tool-save-project.svg", "style": Qt.ToolButtonStyle.ToolButtonTextBesideIcon},
{"action": self.app.window.actionExportVideo, "icon": "themes/cosmic/images/tool-export.svg", "style": Qt.ToolButtonStyle.ToolButtonTextBesideIcon, "stylesheet": "QToolButton { background-color: #0078FF; color: #FFFFFF; }"},
{"action": self.app.window.actionUpdate, "icon": "themes/cosmic/images/warning.svg", "visible": False, "style": Qt.ToolButtonStyle.ToolButtonTextBesideIcon, "stylesheet": "QToolButton { background-color: #141923; color: #FABE0A; }"}
]
self.set_toolbar_buttons(self.app.window.toolBar, icon_size=20, settings=toolbar_buttons)

# Timeline toolbar buttons
timeline_buttons = [
{"action": self.app.window.actionAddTrack, "icon": "themes/cosmic/images/tool-add-track.svg", "style": Qt.ToolButtonTextBesideIcon, "stylesheet": "QToolButton { margin-left: 15px; }"},
{"action": self.app.window.actionUndo, "icon": "themes/cosmic/images/tool-undo.svg", "style": Qt.ToolButtonIconOnly, "stylesheet": "QToolButton { margin-right: 0px; border-bottom-right-radius: 0px; border-top-right-radius: 0px; }"},
{"action": self.app.window.actionRedo, "icon": "themes/cosmic/images/tool-redo.svg", "style": Qt.ToolButtonIconOnly, "stylesheet": "QToolButton { margin-left: 0px; border-bottom-left-radius: 0px; border-top-left-radius: 0px; }"},
{"action": self.app.window.actionSnappingTool, "icon": "themes/cosmic/images/tool-snapping.svg", "style": Qt.ToolButtonIconOnly, "stylesheet": "QToolButton { margin-right: 0px; border-bottom-right-radius: 0px; border-top-right-radius: 0px; }"},
{"action": self.app.window.actionRazorTool, "icon": "themes/cosmic/images/tool-razor.svg", "style": Qt.ToolButtonIconOnly, "stylesheet": "QToolButton { margin-left: 0px; border-bottom-left-radius: 0px; border-top-left-radius: 0px; }"},
{"action": self.app.window.actionAddMarker, "icon": "themes/cosmic/images/tool-add-marker.svg", "style": Qt.ToolButtonTextBesideIcon, "stylesheet": "QToolButton { margin-right: 0px; border-bottom-right-radius: 0px; border-top-right-radius: 0px; }"},
{"action": self.app.window.actionPreviousMarker, "icon": "themes/cosmic/images/tool-prev-marker.svg", "style": Qt.ToolButtonIconOnly, "stylesheet": "QToolButton { margin-left: 0px; border-bottom-left-radius: 0px; border-top-left-radius: 0px; margin-right: 0px; border-bottom-right-radius: 0px; border-top-right-radius: 0px; }"},
{"action": self.app.window.actionNextMarker, "icon": "themes/cosmic/images/tool-next-marker.svg", "style": Qt.ToolButtonIconOnly, "stylesheet": "QToolButton { margin-left: 0px; border-bottom-left-radius: 0px; border-top-left-radius: 0px; }"},
{"action": self.app.window.actionCenterOnPlayhead, "icon": "themes/cosmic/images/tool-center-playhead.svg", "style": Qt.ToolButtonIconOnly, "stylesheet": "QWidget { margin-right: 10px; }"},
{"action": self.app.window.actionAddTrack, "icon": "themes/cosmic/images/tool-add-track.svg", "style": Qt.ToolButtonStyle.ToolButtonTextBesideIcon, "stylesheet": "QToolButton { margin-left: 15px; }"},
{"action": self.app.window.actionUndo, "icon": "themes/cosmic/images/tool-undo.svg", "style": Qt.ToolButtonStyle.ToolButtonIconOnly, "stylesheet": "QToolButton { margin-right: 0px; border-bottom-right-radius: 0px; border-top-right-radius: 0px; }"},
{"action": self.app.window.actionRedo, "icon": "themes/cosmic/images/tool-redo.svg", "style": Qt.ToolButtonStyle.ToolButtonIconOnly, "stylesheet": "QToolButton { margin-left: 0px; border-bottom-left-radius: 0px; border-top-left-radius: 0px; }"},
{"action": self.app.window.actionSnappingTool, "icon": "themes/cosmic/images/tool-snapping.svg", "style": Qt.ToolButtonStyle.ToolButtonIconOnly, "stylesheet": "QToolButton { margin-right: 0px; border-bottom-right-radius: 0px; border-top-right-radius: 0px; }"},
{"action": self.app.window.actionRazorTool, "icon": "themes/cosmic/images/tool-razor.svg", "style": Qt.ToolButtonStyle.ToolButtonIconOnly, "stylesheet": "QToolButton { margin-left: 0px; border-bottom-left-radius: 0px; border-top-left-radius: 0px; }"},
{"action": self.app.window.actionAddMarker, "icon": "themes/cosmic/images/tool-add-marker.svg", "style": Qt.ToolButtonStyle.ToolButtonTextBesideIcon, "stylesheet": "QToolButton { margin-right: 0px; border-bottom-right-radius: 0px; border-top-right-radius: 0px; }"},
{"action": self.app.window.actionPreviousMarker, "icon": "themes/cosmic/images/tool-prev-marker.svg", "style": Qt.ToolButtonStyle.ToolButtonIconOnly, "stylesheet": "QToolButton { margin-left: 0px; border-bottom-left-radius: 0px; border-top-left-radius: 0px; margin-right: 0px; border-bottom-right-radius: 0px; border-top-right-radius: 0px; }"},
{"action": self.app.window.actionNextMarker, "icon": "themes/cosmic/images/tool-next-marker.svg", "style": Qt.ToolButtonStyle.ToolButtonIconOnly, "stylesheet": "QToolButton { margin-left: 0px; border-bottom-left-radius: 0px; border-top-left-radius: 0px; }"},
{"action": self.app.window.actionCenterOnPlayhead, "icon": "themes/cosmic/images/tool-center-playhead.svg", "style": Qt.ToolButtonStyle.ToolButtonIconOnly, "stylesheet": "QWidget { margin-right: 10px; }"},
{"widget": self.app.window.sliderZoomWidget},
{"widget": spacer}
]
Expand All @@ -524,11 +524,11 @@ def apply_theme(self):
# Video toolbar
toolbar_buttons = [
{"expand": True},
{"action": self.app.window.actionJumpStart, "icon": "themes/cosmic/images/tool-media-skip-back.svg", "style": Qt.ToolButtonIconOnly},
{"action": self.app.window.actionRewind, "icon": "themes/cosmic/images/tool-media-rewind.svg", "style": Qt.ToolButtonIconOnly},
{"action": self.app.window.actionPlay, "icon": "themes/cosmic/images/tool-media-play.svg", "style": Qt.ToolButtonIconOnly},
{"action": self.app.window.actionFastForward, "icon": "themes/cosmic/images/tool-media-forward.svg", "style": Qt.ToolButtonIconOnly},
{"action": self.app.window.actionJumpEnd, "icon": "themes/cosmic/images/tool-media-skip-forward.svg", "style": Qt.ToolButtonIconOnly},
{"action": self.app.window.actionJumpStart, "icon": "themes/cosmic/images/tool-media-skip-back.svg", "style": Qt.ToolButtonStyle.ToolButtonIconOnly},
{"action": self.app.window.actionRewind, "icon": "themes/cosmic/images/tool-media-rewind.svg", "style": Qt.ToolButtonStyle.ToolButtonIconOnly},
{"action": self.app.window.actionPlay, "icon": "themes/cosmic/images/tool-media-play.svg", "style": Qt.ToolButtonStyle.ToolButtonIconOnly},
{"action": self.app.window.actionFastForward, "icon": "themes/cosmic/images/tool-media-forward.svg", "style": Qt.ToolButtonStyle.ToolButtonIconOnly},
{"action": self.app.window.actionJumpEnd, "icon": "themes/cosmic/images/tool-media-skip-forward.svg", "style": Qt.ToolButtonStyle.ToolButtonIconOnly},
{"expand": True}
]
self.set_toolbar_buttons(self.app.window.videoToolbar, icon_size=32, settings=toolbar_buttons)
Expand Down
2 changes: 1 addition & 1 deletion src/windows/about.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def __init__(self):
def display_release(self, version_text):

self.txtversion.setText(version_text)
self.txtversion.setAlignment(Qt.AlignCenter)
self.txtversion.setAlignment(Qt.AlignmentFlag.AlignCenter)

def get_current_release(self):
"""Get the current version """
Expand Down
4 changes: 2 additions & 2 deletions src/windows/color_picker.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def build_pattern(self) -> QPixmap:
n = self.checkerboard_size
pat = QPixmap(2 * n, 2 * n)
p = QPainter(pat)
p.setPen(Qt.NoPen)
p.setPen(Qt.PenStyle.NoPen)
# Paint a checkerboard pattern for the color to be overlaid on
self.bg0 = QColor("#aaa")
self.bg1 = QColor("#ccc")
Expand All @@ -148,7 +148,7 @@ def paintEvent(self, event):
"""Show the current color, with checkerboard alpha"""
event.accept()
p = QPainter(self)
p.setPen(Qt.NoPen)
p.setPen(Qt.PenStyle.NoPen)
if self.color.alphaF() < 1.0:
# Draw a checkerboard pattern under the color
p.drawTiledPixmap(event.rect(), self.pattern, QPoint(4,4))
Expand Down
Loading