Add custom resolution option

This commit is contained in:
Cameron Gutman
2020-11-24 00:13:39 -06:00
parent 72182c7caa
commit 7325d5657d
3 changed files with 191 additions and 12 deletions
+5 -3
View File
@@ -19,9 +19,7 @@ ComboBox {
id: textMetrics
}
// We call this every time the options change (and init)
// so we can adjust the combo box width here too
onActivated: {
function recalculateWidth() {
textMetrics.font = font
popupMetrics.font = popup.font
textWidth = 0
@@ -33,6 +31,10 @@ ComboBox {
}
}
// We call this every time the options change (and init)
// so we can adjust the combo box width here too
onActivated: recalculateWidth()
popup.onAboutToShow: {
// Switch to normal navigation for combo boxes
SdlGamepadKeyNavigation.setUiNavMode(false)