[vlc-commits] qml: disable prev/next buttons if there is no prev/next item
    Fatih Uzunoglu 
    git at videolan.org
       
    Mon Dec  7 10:08:42 UTC 2020
    
    
  
vlc | branch: master | Fatih Uzunoglu <fuzun54 at outlook.com> | Fri Dec  4 02:01:58 2020 +0300| [39f8ef8aa997a8541d9ccee30e614c5f404c4d2f] | committer: Pierre Lamot
qml: disable prev/next buttons if there is no prev/next item
Signed-off-by: Pierre Lamot <pierre at videolabs.io>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=39f8ef8aa997a8541d9ccee30e614c5f404c4d2f
---
 modules/gui/qt/player/qml/ControlButtons.qml | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/modules/gui/qt/player/qml/ControlButtons.qml b/modules/gui/qt/player/qml/ControlButtons.qml
index 2fb56926ea..5a11d22940 100644
--- a/modules/gui/qt/player/qml/ControlButtons.qml
+++ b/modules/gui/qt/player/qml/ControlButtons.qml
@@ -138,6 +138,7 @@ Item{
             id: prevBtn
             size: VLCStyle.icon_medium
             iconText: VLCIcons.previous
+            enabled: mainPlaylistController.hasPrev
             onClicked: mainPlaylistController.prev()
             property bool acceptFocus: true
             text: i18n.qtr("Previous")
@@ -354,6 +355,7 @@ Item{
             id: nextBtn
             size: VLCStyle.icon_medium
             iconText: VLCIcons.next
+            enabled: mainPlaylistController.hasNext
             onClicked: mainPlaylistController.next()
             property bool acceptFocus: true
             text: i18n.qtr("Next")
    
    
More information about the vlc-commits
mailing list