From f185e8755fca0b178050574694463b717510ca39 Mon Sep 17 00:00:00 2001 From: Gus Grubba Date: Tue, 30 Jul 2019 13:47:50 -0400 Subject: [PATCH] Make buttons bigger --- custom-example/res/CustomCameraControl.qml | 18 ++++++++++-------- .../res/MainToolbar/CustomModeIndicator.qml | 14 ++++++++------ 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/custom-example/res/CustomCameraControl.qml b/custom-example/res/CustomCameraControl.qml index 37aeb1214..5e47f696e 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 3aacbf687..770aa4d9f 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() -- 2.22.0