Add custom resolution option

This commit is contained in:
Cameron Gutman committed 2020-11-24 00:13:39 -06:00
1 parent 72182c7caa
commit 7325d5657d
3 files changed
+191 -12

No files matched your search

+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)