Improve settings page behavior when the window is too small

This commit is contained in:
Cameron Gutman
2020-05-10 11:12:37 -07:00
parent 4c3a23b1bd
commit ce99b0e162
2 changed files with 20 additions and 1 deletions

View File

@@ -6,8 +6,10 @@ 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
property int desiredWidth : leftPadding + textWidth + indicator.width + rightPadding
property int maximumWidth : parent.width
implicitWidth: leftPadding + textWidth + indicator.width + rightPadding
implicitWidth: desiredWidth < maximumWidth ? desiredWidth : maximumWidth
TextMetrics {
id: popupMetrics