slider no move while pressed

This commit is contained in:
billypom on debian 2024-08-06 19:35:30 -04:00
parent dcd0844d99
commit 9042e6d3ff
2 changed files with 4 additions and 2 deletions

View File

@ -38,8 +38,6 @@ class LyricsWindow(QDialog):
)
if success:
print("success! yay")
error_dialog = ErrorDialog("Could not save lyrics :( sad")
error_dialog.exec()
else:
error_dialog = ErrorDialog("Could not save lyrics :( sad")
error_dialog.exec()

View File

@ -84,6 +84,7 @@ class ApplicationWindow(QMainWindow, Ui_MainWindow):
self.playbackSlider.sliderReleased.connect(
lambda: self.player.setPosition(self.playbackSlider.value())
) # maybe sliderReleased works better than sliderMoved
self
self.volumeSlider.sliderMoved[int].connect(
lambda: self.volume_changed()
) # Move slider to adjust volume
@ -293,6 +294,9 @@ class ApplicationWindow(QMainWindow, Ui_MainWindow):
if stopped:
return
else:
if self.playbackSlider.isSliderDown():
# Prevents slider from updating when dragging
return
# Update the slider
if self.player.state() == QMediaPlayer.State.PlayingState:
self.playbackSlider.setMinimum(0)