Skip to content

Commit

Permalink
Consolidate CPU and GPU video filters in menu.
Browse files Browse the repository at this point in the history
  • Loading branch information
ddennedy committed Feb 10, 2015
1 parent 73724cc commit 352d58f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 25 deletions.
13 changes: 5 additions & 8 deletions src/qml/views/filter/FilterMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@

var visibility = {
FAVORITE: 0,
GPU: 1,
VIDEO: 2,
AUDIO: 3
VIDEO: 1,
AUDIO: 2
}

var ITEM_HEIGHT = 30
Expand All @@ -29,11 +28,9 @@ function isVisible(meta, showType) {
if (meta.isHidden) return false
if (meta.needsGPU && !settings.playerGPU) return false
if (!meta.needsGPU && settings.playerGPU && meta.gpuAlt !== "") return false
if (showType == visibility.FAVORITE && !meta.isFavorite) return false
if (showType == visibility.GPU && !meta.needsGPU) return false
if (showType == visibility.AUDIO && !meta.isAudio) return false
if (showType == visibility.VIDEO && meta.isAudio ) return false
if (showType == visibility.VIDEO && meta.needsGPU ) return false
if (showType === visibility.FAVORITE && !meta.isFavorite) return false
if (showType === visibility.AUDIO && !meta.isAudio) return false
if (showType === visibility.VIDEO && meta.isAudio ) return false
return true
}

Expand Down
17 changes: 0 additions & 17 deletions src/qml/views/filter/FilterMenu.qml
Original file line number Diff line number Diff line change
Expand Up @@ -135,23 +135,6 @@ Loader {
}
}
}
ToolButton {
id: gpuButton
visible: settings.playerGPU
width: visible ? undefined : 0
implicitWidth: 28
implicitHeight: 24
checkable: true
iconName: 'cpu'
iconSource: 'qrc:///icons/oxygen/32x32/devices/cpu.png'
tooltip: qsTr('Show GPU filters')
exclusiveGroup: typeGroup
onCheckedChanged: {
if (checked) {
menuListView.showType = Logic.visibility.GPU
}
}
}
ToolButton {
id: vidButton
implicitWidth: 28
Expand Down

0 comments on commit 352d58f

Please sign in to comment.