]> git.tdb.fi Git - xinema.git/commitdiff
Display the various bits of info only if they are available
authorMikko Rasa <tdb@tdb.fi>
Sun, 18 Oct 2015 13:04:57 +0000 (16:04 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sun, 18 Oct 2015 13:04:57 +0000 (16:04 +0300)
remote/qml/pages/PlaybackPage.qml

index daa48dfd31482d0276e0e6434d7a3119e7cbb163..9bca145752dc8d31dc99a1d66a4afcc5b9d26061 100644 (file)
@@ -37,16 +37,21 @@ Page
 
                        StreamInfo
                        {
-                               text: streamControl.videoSize.width+"×"+streamControl.videoSize.height+" @ "+streamControl.framerate.toFixed(2)+"fps"
+                               visible: streamControl.videoSize.width && streamControl.videoSize.height
+                               property string size: streamControl.videoSize.width+"×"+streamControl.videoSize.height
+                               property string fps: " @ "+streamControl.framerate.toFixed(2)+"fps"
+                               text: (streamControl.framerate ? size+fps : size)
                        }
 
                        StreamInfo
                        {
+                               visible: streamControl.videoCodec
                                text: streamControl.videoCodec
                        }
 
                        StreamInfo
                        {
+                               visible: streamControl.audioCodec
                                text: streamControl.audioCodec
                        }
                }