Browse Source

fix

Signed-off-by: crueter <crueter@eden-emu.dev>
pull/3016/head
crueter 1 month ago
parent
commit
7710503fa4
No known key found for this signature in database GPG Key ID: 425ACD2D4830EBC6
  1. 2
      CMakeModules/EdenModule.cmake
  2. 12
      src/Eden/Config/pages/SettingsList.qml
  3. 2
      src/Eden/Main/GameCarousel.qml
  4. 2
      src/Eden/Main/GameGrid.qml
  5. 219
      src/Eden/Main/StatusBar.qml

2
CMakeModules/EdenModule.cmake

@ -8,7 +8,9 @@ cmake_minimum_required(VERSION 3.16)
function(EdenModule) function(EdenModule)
qt_policy(SET QTP0001 NEW) qt_policy(SET QTP0001 NEW)
if (Qt6_VERSION VERSION_GREATER_EQUAL 6.8)
qt_policy(SET QTP0004 NEW) qt_policy(SET QTP0004 NEW)
endif()
set(oneValueArgs set(oneValueArgs
NAME NAME

12
src/Eden/Config/pages/SettingsList.qml

@ -9,8 +9,6 @@ ListView {
required property int category required property int category
property bool inset: false
property string header: ""
property list<string> idInclude: [] property list<string> idInclude: []
property list<string> idExclude: [] property list<string> idExclude: []
@ -36,14 +34,4 @@ ListView {
spacing: 5 spacing: 5
model: SettingsInterface.category(category, idInclude, idExclude) model: SettingsInterface.category(category, idInclude, idExclude)
// Rectangle {
// anchors.fill: parent
// color: "transparent"
// border {
// color: inset ? palette.text : "transparent"
// width: 1
// }
// }
} }

2
src/Eden/Main/GameCarousel.qml

@ -10,8 +10,8 @@ ListView {
id: carousel id: carousel
focus: true focus: true
focusPolicy: Qt.StrongFocus
// focusPolicy: Qt.StrongFocus
model: EdenGameList model: EdenGameList
orientation: ListView.Horizontal orientation: ListView.Horizontal
clip: false clip: false

2
src/Eden/Main/GameGrid.qml

@ -50,5 +50,5 @@ GridView {
} }
focus: true focus: true
focusPolicy: "StrongFocus"
// focusPolicy: "StrongFocus"
} }

219
src/Eden/Main/StatusBar.qml

@ -8,153 +8,154 @@ import Eden.Items
ToolBar { ToolBar {
id: toolbar id: toolbar
property string graphicsBackend: "vulkan"
property string gpuAccuracy: "high"
property string consoleMode: "docked"
property int adapting: 5
property int antialiasing: 0
property int volume: 100
// TODO: reference actual settings :)
// property string graphicsBackend: "vulkan"
// property string gpuAccuracy: "high"
// property string consoleMode: "docked"
// property int adapting: 5
// property int antialiasing: 0
// property int volume: 100
property string firmwareVersion: "16.0.3"
// property string firmwareVersion: "16.0.3"
implicitHeight: 30
// implicitHeight: 30
background: Rectangle {
color: palette.dark
}
// background: Rectangle {
// color: palette.dark
// }
// TODO: reduce duplicate code
RowLayout {
id: row
// // TODO: reduce duplicate code
// RowLayout {
// id: row
anchors {
left: parent.left
top: parent.top
bottom: parent.bottom
// anchors {
// left: parent.left
// top: parent.top
// bottom: parent.bottom
leftMargin: 10
}
// leftMargin: 10
// }
StatusBarButton {
property alias value: toolbar.graphicsBackend
// StatusBarButton {
// property alias value: toolbar.graphicsBackend
text: value.toUpperCase()
// text: value.toUpperCase()
textColor: value === "vulkan" ? "orange" : "lightblue"
// textColor: value === "vulkan" ? "orange" : "lightblue"
onClicked: {
if (value === "vulkan") {
value = "opengl"
} else {
value = "vulkan"
}
}
}
// onClicked: {
// if (value === "vulkan") {
// value = "opengl"
// } else {
// value = "vulkan"
// }
// }
// }
StatusBarButton {
property alias value: toolbar.gpuAccuracy
// StatusBarButton {
// property alias value: toolbar.gpuAccuracy
text: value.toUpperCase()
// text: value.toUpperCase()
textColor: value === "high" ? "orange" : "lightgreen"
// textColor: value === "high" ? "orange" : "lightgreen"
onClicked: {
if (value === "high") {
value = "normal"
} else {
value = "high"
}
}
}
// onClicked: {
// if (value === "high") {
// value = "normal"
// } else {
// value = "high"
// }
// }
// }
StatusBarButton {
property alias value: toolbar.consoleMode
// StatusBarButton {
// property alias value: toolbar.consoleMode
text: value.toUpperCase()
// text: value.toUpperCase()
textColor: palette.text
// textColor: palette.text
onClicked: {
if (value === "docked") {
value = "handheld"
} else {
value = "docked"
}
}
}
// onClicked: {
// if (value === "docked") {
// value = "handheld"
// } else {
// value = "docked"
// }
// }
// }
StatusBarButton {
property list<string> choices: ["nearest", "bilinear", "bicubic", "gaussian", "scaleforce", "fsr"]
// StatusBarButton {
// property list<string> choices: ["nearest", "bilinear", "bicubic", "gaussian", "scaleforce", "fsr"]
property alias index: toolbar.adapting
property string value: choices[index]
// property alias index: toolbar.adapting
// property string value: choices[index]
text: value.toUpperCase()
// text: value.toUpperCase()
onClicked: {
let newIndex = index + 1
if (newIndex >= choices.length) {
newIndex = 0
}
// onClicked: {
// let newIndex = index + 1
// if (newIndex >= choices.length) {
// newIndex = 0
// }
index = newIndex
}
}
// index = newIndex
// }
// }
StatusBarButton {
property list<string> choices: ["no aa", "fxaa", "msaa"]
// StatusBarButton {
// property list<string> choices: ["no aa", "fxaa", "msaa"]
property alias index: toolbar.antialiasing
property string value: choices[index]
// property alias index: toolbar.antialiasing
// property string value: choices[index]
text: value.toUpperCase()
// text: value.toUpperCase()
onClicked: {
let newIndex = index + 1
if (newIndex >= choices.length) {
newIndex = 0
}
// onClicked: {
// let newIndex = index + 1
// if (newIndex >= choices.length) {
// newIndex = 0
// }
index = newIndex
}
}
// index = newIndex
// }
// }
StatusBarButton {
id: volumeButton
// StatusBarButton {
// id: volumeButton
property alias value: toolbar.volume
// property alias value: toolbar.volume
text: "VOLUME: " + value + "%"
// text: "VOLUME: " + value + "%"
onClicked: {
volumeSlider.open()
}
// onClicked: {
// volumeSlider.open()
// }
onWheel: wheel => {
value += wheel.angleDelta.y / 120
}
}
}
// onWheel: wheel => {
// value += wheel.angleDelta.y / 120
// }
// }
// }
Popup {
id: volumeSlider
// Popup {
// id: volumeSlider
width: 200
height: 50
// width: 200
// height: 50
x: volumeButton.x
y: volumeButton.y - height
// x: volumeButton.x
// y: volumeButton.y - height
focus: true
// focus: true
Slider {
value: volumeButton.value
onMoved: volumeButton.value = value
// Slider {
// value: volumeButton.value
// onMoved: volumeButton.value = value
from: 0
to: 200
// from: 0
// to: 200
anchors.fill: parent
}
}
// anchors.fill: parent
// }
// }
} }
Loading…
Cancel
Save