Added track length and current position indicator.

This commit is contained in:
The Wobbler 2024-12-20 18:11:25 +01:00
parent b158a234fd
commit d089a57151
2 changed files with 8 additions and 2 deletions

2
.gitignore vendored
View file

@ -1,2 +1,2 @@
__pycache__ __pycache__
.idea/ .idea

View file

@ -2,7 +2,7 @@
from PyQt6.QtCore import Qt from PyQt6.QtCore import Qt
from PyQt6.QtGui import QIcon from PyQt6.QtGui import QIcon
from PyQt6.QtWidgets import QToolBar, QSlider, QStyle from PyQt6.QtWidgets import QToolBar, QLabel, QSlider
class TrackControl(QToolBar): class TrackControl(QToolBar):
@ -21,6 +21,12 @@ class TrackControl(QToolBar):
icon = QIcon.fromTheme(QIcon.ThemeIcon.MediaSkipForward) icon = QIcon.fromTheme(QIcon.ThemeIcon.MediaSkipForward)
self.next_button = self.addAction(icon, "Next") self.next_button = self.addAction(icon, "Next")
self.current_position_indicator = QLabel("0:00")
self.addWidget(self.current_position_indicator)
self.play_position_slider = QSlider(Qt.Orientation.Horizontal, self) self.play_position_slider = QSlider(Qt.Orientation.Horizontal, self)
self.addWidget(self.play_position_slider) self.addWidget(self.play_position_slider)
self.track_length_indicator = QLabel("1:00")
self.addWidget(self.track_length_indicator)