From d089a57151bf2019b7af2ce468b472e31c2e90ab Mon Sep 17 00:00:00 2001 From: EKNr1 Date: Fri, 20 Dec 2024 18:11:25 +0100 Subject: [PATCH] Added track length and current position indicator. --- .gitignore | 2 +- wobuzz/ui/track_control.py | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index f3f6814..341e31e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ __pycache__ -.idea/ \ No newline at end of file +.idea \ No newline at end of file diff --git a/wobuzz/ui/track_control.py b/wobuzz/ui/track_control.py index 63e1d13..4859b20 100644 --- a/wobuzz/ui/track_control.py +++ b/wobuzz/ui/track_control.py @@ -2,7 +2,7 @@ from PyQt6.QtCore import Qt from PyQt6.QtGui import QIcon -from PyQt6.QtWidgets import QToolBar, QSlider, QStyle +from PyQt6.QtWidgets import QToolBar, QLabel, QSlider class TrackControl(QToolBar): @@ -21,6 +21,12 @@ class TrackControl(QToolBar): icon = QIcon.fromTheme(QIcon.ThemeIcon.MediaSkipForward) 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.addWidget(self.play_position_slider) + self.track_length_indicator = QLabel("1:00") + self.addWidget(self.track_length_indicator) +