Skip to content

Commit

Permalink
gui: fix several bugs of video-show (#812)
Browse files Browse the repository at this point in the history
  • Loading branch information
cosven committed Mar 10, 2024
1 parent a066262 commit 700fa67
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion feeluown/gui/uimain/nowplaying_overlay.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,11 @@ def enter_video_mode(self):
self.artwork_view.set_body(video_widget)
else:
with video_widget.change_parent():
video_widget.show()
# Remember always give video_widget a parent first and
# then show it. Otherwise, mpv may use its mpv-gui to show video,
# which causes the player crash.
self.artwork_view.set_body(video_widget)
video_widget.show()
self.ctl_btns.hide()
self.progress.hide()
video_widget.ctl_bar.clear_adhoc_btns()
Expand Down
1 change: 1 addition & 0 deletions feeluown/gui/widgets/video.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ def add_adhoc_btn(self, text: str) -> QPushButton:
"""
btn = Button(text)
self._adhoc_btn_layout.addWidget(btn)
btn.setPalette(self.palette())
return btn

def clear_adhoc_btns(self):
Expand Down

0 comments on commit 700fa67

Please sign in to comment.