mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-19 07:01:02 +00:00
Improve gamepad navigation on settings page
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Controls 2.2
|
||||
|
||||
import SdlGamepadKeyNavigation 1.0
|
||||
|
||||
// https://stackoverflow.com/questions/45029968/how-do-i-set-the-combobox-width-to-fit-the-largest-item
|
||||
ComboBox {
|
||||
property int textWidth
|
||||
@@ -28,4 +30,13 @@ ComboBox {
|
||||
textWidth = Math.max(popupMetrics.width, textWidth)
|
||||
}
|
||||
}
|
||||
|
||||
popup.onAboutToShow: {
|
||||
// Switch to normal navigation for combo boxes
|
||||
SdlGamepadKeyNavigation.setUiNavMode(false)
|
||||
}
|
||||
|
||||
popup.onAboutToHide: {
|
||||
SdlGamepadKeyNavigation.setUiNavMode(true)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user