From 534a0358411293663f82f4f1c7ccf4f7594aac10 Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Mon, 29 Apr 2019 14:50:14 +0200 Subject: [PATCH] Add a grid with images Those images indicate the type of data we are collecting anonymously. Contributes to CURA-6434. --- .../WelcomePages/DataCollectionsContent.qml | 31 +++++++-- resources/qml/WelcomePages/ImageTile.qml | 39 +++++++++++ .../images/first_run_share_data.svg | 67 ------------------- 3 files changed, 66 insertions(+), 71 deletions(-) create mode 100644 resources/qml/WelcomePages/ImageTile.qml delete mode 100644 resources/themes/cura-light/images/first_run_share_data.svg diff --git a/resources/qml/WelcomePages/DataCollectionsContent.qml b/resources/qml/WelcomePages/DataCollectionsContent.qml index f2bfe10133..295dc3f8a1 100644 --- a/resources/qml/WelcomePages/DataCollectionsContent.qml +++ b/resources/qml/WelcomePages/DataCollectionsContent.qml @@ -61,11 +61,34 @@ Item renderType: Text.NativeRendering } - Image - { - id: curaImage + Grid { + columns: 2 + spacing: UM.Theme.getSize("wide_margin").height anchors.horizontalCenter: parent.horizontalCenter - source: UM.Theme.getImage("first_run_share_data") + + ImageTile + { + text: catalog.i18nc("@text", "Machine types") + imageSource: UM.Theme.getImage("first_run_machine_types") + } + + ImageTile + { + text: catalog.i18nc("@text", "Material usage") + imageSource: UM.Theme.getImage("first_run_material_usage") + } + + ImageTile + { + text: catalog.i18nc("@text", "Number of slices") + imageSource: UM.Theme.getImage("first_run_number_slices") + } + + ImageTile + { + text: catalog.i18nc("@text", "Print settings") + imageSource: UM.Theme.getImage("first_run_print_settings") + } } Label diff --git a/resources/qml/WelcomePages/ImageTile.qml b/resources/qml/WelcomePages/ImageTile.qml new file mode 100644 index 0000000000..7ed07304e6 --- /dev/null +++ b/resources/qml/WelcomePages/ImageTile.qml @@ -0,0 +1,39 @@ +// 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 UM 1.3 as UM + + +// +// This component places a text on top of an image. +// +Column +{ + leftPadding: UM.Theme.getSize("default_margin").width + rightPadding: UM.Theme.getSize("default_margin").width + spacing: UM.Theme.getSize("default_margin").height + property alias text: label.text + property alias imageSource: image.source + + Label + { + id: label + width: image.width + anchors.horizontalCenter: image.horizontalCenter + horizontalAlignment: Text.AlignHCenter + text: "" + wrapMode: Text.WordWrap + font: UM.Theme.getFont("default") + color: UM.Theme.getColor("text") + renderType: Text.NativeRendering + } + + Image + { + id: image + source: "" + } +} \ No newline at end of file diff --git a/resources/themes/cura-light/images/first_run_share_data.svg b/resources/themes/cura-light/images/first_run_share_data.svg deleted file mode 100644 index cd87431067..0000000000 --- a/resources/themes/cura-light/images/first_run_share_data.svg +++ /dev/null @@ -1,67 +0,0 @@ - - - - Group 2 - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file