diff --git a/resources/qml/LabelBar.qml b/resources/qml/LabelBar.qml index 3985a47368..571c9f0bfb 100644 --- a/resources/qml/LabelBar.qml +++ b/resources/qml/LabelBar.qml @@ -1,7 +1,12 @@ -import QtQuick 2.0 -import QtQuick.Controls 2.1 +// Copyright (c) 2019 Ultimaker B.V. +// Cura is released under the terms of the LGPLv3 or higher. + +import QtQuick 2.10 +import QtQuick.Controls 2.3 import QtQuick.Layouts 1.3 + import UM 1.2 as UM + // The labelBar shows a set of labels that are evenly spaced from oneother. // The first item is aligned to the left, the last is aligned to the right. // It's intended to be used together with RadioCheckBar. As such, it needs @@ -27,8 +32,9 @@ Item Item { Layout.fillWidth: true - Layout.maximumWidth: index + 1 === repeater.count || repeater.count <= 1 ? itemSize : base.width / (repeater.count - 1) + Layout.maximumWidth: Math.round(index + 1 === repeater.count || repeater.count <= 1 ? itemSize : base.width / (repeater.count - 1)) height: label.height + Label { id: label @@ -47,7 +53,7 @@ Item // We want the center of the label to align with the center of the item, so we negatively offset by half the contentWidth right: index + 1 === repeater.count ? parent.right: undefined left: index + 1 === repeater.count || index === 0 ? undefined: parent.left - leftMargin: (0.5 * itemSize) - 0.5 * contentWidth + leftMargin: Math.round((itemSize - contentWidth) * 0.5) } } } diff --git a/resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml b/resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml index fb074e948c..959d498054 100644 --- a/resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml +++ b/resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml @@ -1,8 +1,8 @@ // Copyright (c) 2018 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. -import QtQuick 2.7 -import QtQuick.Controls 2.0 +import QtQuick 2.10 +import QtQuick.Controls 2.3 import QtQuick.Controls.Styles 1.4 import UM 1.2 as UM diff --git a/resources/qml/PrintSetupSelector/Custom/CustomPrintSetup.qml b/resources/qml/PrintSetupSelector/Custom/CustomPrintSetup.qml index f329b1ce65..d38dfc14f8 100644 --- a/resources/qml/PrintSetupSelector/Custom/CustomPrintSetup.qml +++ b/resources/qml/PrintSetupSelector/Custom/CustomPrintSetup.qml @@ -1,9 +1,9 @@ // Copyright (c) 2018 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. -import QtQuick 2.7 -import QtQuick.Controls 2.0 -import QtQuick.Controls 1.1 as OldControls +import QtQuick 2.10 +import QtQuick.Controls 2.3 +import QtQuick.Controls 1.4 as OldControls import UM 1.3 as UM import Cura 1.6 as Cura diff --git a/resources/qml/PrintSetupSelector/Custom/MenuButton.qml b/resources/qml/PrintSetupSelector/Custom/MenuButton.qml index 511e29de2a..29436da9cf 100644 --- a/resources/qml/PrintSetupSelector/Custom/MenuButton.qml +++ b/resources/qml/PrintSetupSelector/Custom/MenuButton.qml @@ -1,8 +1,11 @@ -import QtQuick 2.0 +// Copyright (c) 2019 Ultimaker B.V. +// Cura is released under the terms of the LGPLv3 or higher. + +import QtQuick 2.10 import QtQuick.Controls 2.3 -import Cura 1.6 as Cura import UM 1.2 as UM +import Cura 1.6 as Cura Button { diff --git a/resources/qml/PrintSetupSelector/Custom/QualitiesWithIntentMenu.qml b/resources/qml/PrintSetupSelector/Custom/QualitiesWithIntentMenu.qml index 2aa80e8fe7..18088d50b9 100644 --- a/resources/qml/PrintSetupSelector/Custom/QualitiesWithIntentMenu.qml +++ b/resources/qml/PrintSetupSelector/Custom/QualitiesWithIntentMenu.qml @@ -1,8 +1,12 @@ -import QtQuick 2.0 +// Copyright (c) 2019 Ultimaker B.V. +// Cura is released under the terms of the LGPLv3 or higher. + +import QtQuick 2.10 import QtQuick.Controls 2.3 -import Cura 1.6 as Cura import UM 1.2 as UM +import Cura 1.6 as Cura + Popup { id: popup diff --git a/resources/qml/PrintSetupSelector/PrintSetupSelectorHeader.qml b/resources/qml/PrintSetupSelector/PrintSetupSelectorHeader.qml index 30691d32b9..5628867922 100644 --- a/resources/qml/PrintSetupSelector/PrintSetupSelectorHeader.qml +++ b/resources/qml/PrintSetupSelector/PrintSetupSelectorHeader.qml @@ -1,7 +1,7 @@ // Copyright (c) 2018 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. -import QtQuick 2.7 +import QtQuick 2.10 import QtQuick.Controls 2.3 import QtQuick.Layouts 1.3 diff --git a/resources/qml/PrintSetupSelector/Recommended/RecommendedPrintSetup.qml b/resources/qml/PrintSetupSelector/Recommended/RecommendedPrintSetup.qml index d9364681d2..a180ad6324 100644 --- a/resources/qml/PrintSetupSelector/Recommended/RecommendedPrintSetup.qml +++ b/resources/qml/PrintSetupSelector/Recommended/RecommendedPrintSetup.qml @@ -1,7 +1,7 @@ // Copyright (c) 2018 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. -import QtQuick 2.7 +import QtQuick 2.10 import QtQuick.Controls 1.4 import QtQuick.Controls.Styles 1.4 diff --git a/resources/qml/PrintSetupSelector/Recommended/RecommendedQualityProfileSelector.qml b/resources/qml/PrintSetupSelector/Recommended/RecommendedQualityProfileSelector.qml index 2742605399..68a3e4811d 100644 --- a/resources/qml/PrintSetupSelector/Recommended/RecommendedQualityProfileSelector.qml +++ b/resources/qml/PrintSetupSelector/Recommended/RecommendedQualityProfileSelector.qml @@ -1,7 +1,7 @@ // Copyright (c) 2018 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. -import QtQuick 2.7 +import QtQuick 2.10 import QtQuick.Controls 1.4 import QtQuick.Controls 2.3 as Controls2 import QtQuick.Controls.Styles 1.4 diff --git a/resources/qml/RadioCheckbar.qml b/resources/qml/RadioCheckbar.qml index 6f5ed301fa..3c767a6201 100644 --- a/resources/qml/RadioCheckbar.qml +++ b/resources/qml/RadioCheckbar.qml @@ -1,4 +1,7 @@ -import QtQuick 2.0 +// Copyright (c) 2019 Ultimaker B.V. +// Cura is released under the terms of the LGPLv3 or higher. + +import QtQuick 2.10 import QtQuick.Controls 2.3 import QtQuick.Layouts 1.3 import UM 1.1 as UM