From a73ae6b655f3a85df644265314f5cbc9072c54f3 Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Tue, 25 Jan 2022 11:08:52 +0100 Subject: [PATCH] Replace Cura.CheckBoxWithTooltip with UM.CheckBox. Remove Cura.CheckBoxWithTooltip.qml from qmldir module definition. Remove Cura.CheckBox.qml from qmldir module definition as it has been moved to Uranium --- .../src/qml/components/BackupListFooter.qml | 2 +- resources/qml/CheckBoxWithTooltip.qml | 63 ------------------- resources/qml/qmldir | 2 - 3 files changed, 1 insertion(+), 66 deletions(-) delete mode 100644 resources/qml/CheckBoxWithTooltip.qml diff --git a/plugins/CuraDrive/src/qml/components/BackupListFooter.qml b/plugins/CuraDrive/src/qml/components/BackupListFooter.qml index 15af7521ed..b196ed3b22 100644 --- a/plugins/CuraDrive/src/qml/components/BackupListFooter.qml +++ b/plugins/CuraDrive/src/qml/components/BackupListFooter.qml @@ -35,7 +35,7 @@ RowLayout busy: CuraDrive.isCreatingBackup } - Cura.CheckBoxWithTooltip + UM.CheckBox { id: autoBackupEnabled checked: CuraDrive.autoBackupEnabled diff --git a/resources/qml/CheckBoxWithTooltip.qml b/resources/qml/CheckBoxWithTooltip.qml deleted file mode 100644 index dae742cd86..0000000000 --- a/resources/qml/CheckBoxWithTooltip.qml +++ /dev/null @@ -1,63 +0,0 @@ -// 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.1 - -import UM 1.3 as UM - -CheckBox -{ - id: checkbox - hoverEnabled: true - - property alias tooltip: tooltip.text - - indicator: Rectangle - { - implicitWidth: UM.Theme.getSize("checkbox").width - implicitHeight: UM.Theme.getSize("checkbox").height - x: 0 - anchors.verticalCenter: parent.verticalCenter - color: UM.Theme.getColor("main_background") - radius: UM.Theme.getSize("checkbox_radius").width - border.width: UM.Theme.getSize("default_lining").width - border.color: checkbox.hovered ? UM.Theme.getColor("checkbox_border_hover") : UM.Theme.getColor("checkbox_border") - - UM.RecolorImage - { - anchors.verticalCenter: parent.verticalCenter - anchors.horizontalCenter: parent.horizontalCenter - height: UM.Theme.getSize("checkbox_mark").height - width: UM.Theme.getSize("checkbox_mark").width - sourceSize.height: width - color: UM.Theme.getColor("checkbox_mark") - source: UM.Theme.getIcon("CheckMark", "low") - opacity: checkbox.checked - Behavior on opacity { NumberAnimation { duration: 100; } } - } - } - - contentItem: Label - { - anchors - { - left: checkbox.indicator.right - leftMargin: UM.Theme.getSize("narrow_margin").width - } - text: checkbox.text - color: UM.Theme.getColor("checkbox_text") - font: UM.Theme.getFont("default") - renderType: Text.NativeRendering - elide: Text.ElideRight - verticalAlignment: Text.AlignVCenter - } - - ToolTip - { - id: tooltip - text: "" - delay: 500 - visible: text != "" && checkbox.hovered - } -} diff --git a/resources/qml/qmldir b/resources/qml/qmldir index df2518c988..52d2df75ab 100644 --- a/resources/qml/qmldir +++ b/resources/qml/qmldir @@ -16,7 +16,6 @@ ViewsSelector 1.0 ViewsSelector.qml ToolbarButton 1.0 ToolbarButton.qml SettingView 1.0 SettingView.qml ProfileMenu 1.0 ProfileMenu.qml -CheckBoxWithTooltip 1.0 CheckBoxWithTooltip.qml ToolTip 1.0 ToolTip.qml @@ -28,7 +27,6 @@ WizardDialog 1.0 WizardDialog.qml # Cura/Widgets -CheckBox 1.0 CheckBox.qml ComboBox 1.0 ComboBox.qml NotificationIcon 1.0 NotificationIcon.qml RadioButton 1.0 RadioButton.qml