From ff803dcba1a1a2b7322d1b035afdcc88aac3f310 Mon Sep 17 00:00:00 2001 From: DonLakeFlyer Date: Sun, 6 Oct 2019 19:54:20 -0700 Subject: [PATCH] Update for Qt 5.11 --- src/PlanView/PlanEditToolbar.qml | 2 +- src/QmlControls/QGCComboBox.qml | 19 +++++++++---------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/PlanView/PlanEditToolbar.qml b/src/PlanView/PlanEditToolbar.qml index f3a837ca1..7822e41a5 100644 --- a/src/PlanView/PlanEditToolbar.qml +++ b/src/PlanView/PlanEditToolbar.qml @@ -8,7 +8,7 @@ ****************************************************************************/ import QtQuick 2.3 -import QtQuick.Controls 2.11 +import QtQuick.Controls 2.4 import QtQuick.Layouts 1.2 import QGroundControl 1.0 diff --git a/src/QmlControls/QGCComboBox.qml b/src/QmlControls/QGCComboBox.qml index 5fcd19b8f..44bd0a2ab 100644 --- a/src/QmlControls/QGCComboBox.qml +++ b/src/QmlControls/QGCComboBox.qml @@ -8,10 +8,10 @@ ****************************************************************************/ import QtQuick 2.11 -import QtQuick.Window 2.11 -import QtQuick.Controls 2.11 -import QtQuick.Controls.impl 2.11 -import QtQuick.Templates 2.11 as T +import QtQuick.Window 2.3 +import QtQuick.Controls 2.4 +import QtQuick.Controls.impl 2.4 +import QtQuick.Templates 2.4 as T import QGroundControl.ScreenTools 1.0 import QGroundControl.Palette 1.0 @@ -20,12 +20,11 @@ T.ComboBox { id: control padding: ScreenTools.comboBoxPadding spacing: ScreenTools.defaultFontPixelWidth - implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, - implicitContentWidth + leftPadding + rightPadding, - sizeToContents ? _popupWidth : 0) - implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, - implicitContentHeight + topPadding + bottomPadding, - implicitIndicatorHeight + topPadding + bottomPadding) + implicitWidth: Math.max(background ? background.implicitWidth : 0, + contentItem.implicitWidth + leftPadding + rightPadding) + implicitHeight: Math.max(background ? background.implicitHeight : 0, + Math.max(contentItem.implicitHeight, + indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding) leftPadding: padding + (!control.mirrored || !indicator || !indicator.visible ? 0 : indicator.width + spacing) rightPadding: padding + (control.mirrored || !indicator || !indicator.visible ? 0 : indicator.width) -- 2.22.0