Disable the decoder selection options when HDR is enabled

This commit is contained in:
Cameron Gutman
2022-04-05 20:09:09 -05:00
parent 57a34a7abb
commit 5de0dc2713
+18
View File
@@ -1288,6 +1288,7 @@ Flickable {
id: decoderComboBox id: decoderComboBox
textRole: "text" textRole: "text"
enabled: !enableHdr.checked
model: ListModel { model: ListModel {
id: decoderListModel id: decoderListModel
ListElement { ListElement {
@@ -1305,10 +1306,27 @@ Flickable {
} }
// ::onActivated must be used, as it only listens for when the index is changed by a human // ::onActivated must be used, as it only listens for when the index is changed by a human
onActivated: { onActivated: {
if (enabled) {
StreamingPreferences.videoDecoderSelection = decoderListModel.get(currentIndex).val StreamingPreferences.videoDecoderSelection = decoderListModel.get(currentIndex).val
} }
} }
// This handles the state of the enableHdr checkbox changing
onEnabledChanged: {
if (enabled) {
StreamingPreferences.videoDecoderSelection = decoderListModel.get(currentIndex).val
}
else {
StreamingPreferences.videoDecoderSelection = StreamingPreferences.VDS_AUTO
}
}
ToolTip.delay: 1000
ToolTip.timeout: 5000
ToolTip.visible: hovered && !enabled
ToolTip.text: qsTr("Enabling HDR overrides manual decoder selections.")
}
Label { Label {
width: parent.width width: parent.width
id: resVCCTitle id: resVCCTitle