Add custom resolution option

This commit is contained in:
Cameron Gutman 2020-11-24 00:13:39 -06:00
commit 7325d5657d
3 changed files with 191 additions and 12 deletions

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)