diff --git a/custom-example/res/CustomCameraControl.qml b/custom-example/res/CustomCameraControl.qml index 37aeb12140baa3d8f9fc973c5c9191ed772961a0..5e47f696e7d5817d8c32cb90df064746f4cc412f 100644 --- a/custom-example/res/CustomCameraControl.qml +++ b/custom-example/res/CustomCameraControl.qml @@ -965,23 +965,25 @@ Item { contentHeight: comboListCol.height contentWidth: comboListCol.width anchors.horizontalCenter: parent.horizontalCenter - Column { + ColumnLayout { id: comboListCol spacing: ScreenTools.defaultFontPixelHeight anchors.margins: ScreenTools.defaultFontPixelHeight anchors.horizontalCenter: parent.horizontalCenter QGCLabel { - text: qsTr("Thermal Palettes") - anchors.horizontalCenter: parent.horizontalCenter + text: qsTr("Thermal Palettes") + Layout.alignment: Qt.AlignHCenter } Repeater { model: _irPaletteFact ? _irPaletteFact.enumStrings : [] QGCButton { - text: modelData - width: ScreenTools.defaultFontPixelWidth * 30 - height: ScreenTools.defaultFontPixelHeight * 2 - checked: index === _irPaletteFact.value - anchors.horizontalCenter: parent.horizontalCenter + text: modelData + Layout.minimumHeight: ScreenTools.defaultFontPixelHeight * 3 + Layout.minimumWidth: ScreenTools.defaultFontPixelWidth * 30 + Layout.fillHeight: true + Layout.fillWidth: true + Layout.alignment: Qt.AlignHCenter + checked: index === _irPaletteFact.value onClicked: { _irPaletteFact.value = index thermalPalettes.close() diff --git a/custom-example/res/MainToolbar/CustomModeIndicator.qml b/custom-example/res/MainToolbar/CustomModeIndicator.qml index 3aacbf6876686a427d47de779b057f7c2d0cf103..770aa4d9fad6b5c9048f8883f4d234a9651669c2 100644 --- a/custom-example/res/MainToolbar/CustomModeIndicator.qml +++ b/custom-example/res/MainToolbar/CustomModeIndicator.qml @@ -73,21 +73,23 @@ Item { border.color: qgcPal.text radius: ScreenTools.defaultFontPixelWidth } - Column { + ColumnLayout { id: comboListCol spacing: ScreenTools.defaultFontPixelHeight anchors.centerIn: parent QGCLabel { - text: qsTr("Flight Modes") - anchors.horizontalCenter: parent.horizontalCenter + text: qsTr("Flight Modes") + Layout.alignment: Qt.AlignHCenter } Repeater { model: activeVehicle ? activeVehicle.flightModes : [ ] QGCButton { text: modelData - width: ScreenTools.defaultFontPixelWidth * 30 - height: ScreenTools.defaultFontPixelHeight * 2 - anchors.horizontalCenter: parent.horizontalCenter + Layout.minimumHeight: ScreenTools.defaultFontPixelHeight * 3 + Layout.minimumWidth: ScreenTools.defaultFontPixelWidth * 30 + Layout.fillHeight: true + Layout.fillWidth: true + Layout.alignment: Qt.AlignHCenter onClicked: { activeVehicle.flightMode = modelData flightModesMenu.close()