From 510acfab62ac1183f6eb2f53013864ede336b28a Mon Sep 17 00:00:00 2001 From: Dimitriovski Date: Fri, 21 Feb 2020 17:05:27 +0100 Subject: [PATCH 1/4] Replaced the logobot.svg image with a new placeholder.svg image CURA-7162 --- .../resources/qml/components/ToolboxDownloadsGridTile.qml | 2 +- .../resources/qml/components/ToolboxDownloadsShowcaseTile.qml | 2 +- plugins/Toolbox/resources/qml/dialogs/CompatibilityDialog.qml | 4 ++-- .../Toolbox/resources/qml/dialogs/ToolboxLicenseDialog.qml | 2 +- plugins/Toolbox/resources/qml/pages/ToolboxAuthorPage.qml | 2 +- plugins/Toolbox/resources/qml/pages/ToolboxDetailPage.qml | 2 +- plugins/Toolbox/resources/qml/pages/WelcomePage.qml | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/plugins/Toolbox/resources/qml/components/ToolboxDownloadsGridTile.qml b/plugins/Toolbox/resources/qml/components/ToolboxDownloadsGridTile.qml index 78cdf1562a..51afddb6f3 100644 --- a/plugins/Toolbox/resources/qml/components/ToolboxDownloadsGridTile.qml +++ b/plugins/Toolbox/resources/qml/components/ToolboxDownloadsGridTile.qml @@ -67,7 +67,7 @@ Item width: UM.Theme.getSize("toolbox_thumbnail_small").width - UM.Theme.getSize("wide_margin").width height: UM.Theme.getSize("toolbox_thumbnail_small").height - UM.Theme.getSize("wide_margin").width fillMode: Image.PreserveAspectFit - source: model.icon_url || "../../images/logobot.svg" + source: model.icon_url || "../../images/placeholder.svg" mipmap: true } UM.RecolorImage diff --git a/plugins/Toolbox/resources/qml/components/ToolboxDownloadsShowcaseTile.qml b/plugins/Toolbox/resources/qml/components/ToolboxDownloadsShowcaseTile.qml index f6e32b2d84..4dae6ac168 100644 --- a/plugins/Toolbox/resources/qml/components/ToolboxDownloadsShowcaseTile.qml +++ b/plugins/Toolbox/resources/qml/components/ToolboxDownloadsShowcaseTile.qml @@ -23,7 +23,7 @@ Rectangle height: UM.Theme.getSize("toolbox_thumbnail_large").height - 4 * UM.Theme.getSize("default_margin").height width: UM.Theme.getSize("toolbox_thumbnail_large").height - 4 * UM.Theme.getSize("default_margin").height fillMode: Image.PreserveAspectFit - source: model.icon_url || "../../images/logobot.svg" + source: model.icon_url || "../../images/placeholder.svg" mipmap: true anchors { diff --git a/plugins/Toolbox/resources/qml/dialogs/CompatibilityDialog.qml b/plugins/Toolbox/resources/qml/dialogs/CompatibilityDialog.qml index 17bbdba4c5..35144d4630 100644 --- a/plugins/Toolbox/resources/qml/dialogs/CompatibilityDialog.qml +++ b/plugins/Toolbox/resources/qml/dialogs/CompatibilityDialog.qml @@ -68,7 +68,7 @@ UM.Dialog{ Image { id: packageIcon - source: model.icon_url || "../../images/logobot.svg" + source: model.icon_url || "../../images/placeholder.svg" height: lineHeight width: height mipmap: true @@ -111,7 +111,7 @@ UM.Dialog{ Image { id: packageIcon - source: model.icon_url || "../../images/logobot.svg" + source: model.icon_url || "../../images/placeholder.svg" height: lineHeight width: height mipmap: true diff --git a/plugins/Toolbox/resources/qml/dialogs/ToolboxLicenseDialog.qml b/plugins/Toolbox/resources/qml/dialogs/ToolboxLicenseDialog.qml index dd0237eada..17ece52292 100644 --- a/plugins/Toolbox/resources/qml/dialogs/ToolboxLicenseDialog.qml +++ b/plugins/Toolbox/resources/qml/dialogs/ToolboxLicenseDialog.qml @@ -54,7 +54,7 @@ UM.Dialog width: 30 * screenScaleFactor height: width fillMode: Image.PreserveAspectFit - source: licenseModel.iconUrl || "../../images/logobot.svg" + source: licenseModel.iconUrl || "../../images/placeholder.svg" mipmap: true } diff --git a/plugins/Toolbox/resources/qml/pages/ToolboxAuthorPage.qml b/plugins/Toolbox/resources/qml/pages/ToolboxAuthorPage.qml index d1abe48de1..3b4affc109 100644 --- a/plugins/Toolbox/resources/qml/pages/ToolboxAuthorPage.qml +++ b/plugins/Toolbox/resources/qml/pages/ToolboxAuthorPage.qml @@ -33,7 +33,7 @@ Item width: UM.Theme.getSize("toolbox_thumbnail_medium").width height: UM.Theme.getSize("toolbox_thumbnail_medium").height fillMode: Image.PreserveAspectFit - source: details.icon_url || "../../images/logobot.svg" + source: details.icon_url || "../../images/placeholder.svg" mipmap: true anchors { diff --git a/plugins/Toolbox/resources/qml/pages/ToolboxDetailPage.qml b/plugins/Toolbox/resources/qml/pages/ToolboxDetailPage.qml index 6d34e23f42..3917aebb41 100644 --- a/plugins/Toolbox/resources/qml/pages/ToolboxDetailPage.qml +++ b/plugins/Toolbox/resources/qml/pages/ToolboxDetailPage.qml @@ -46,7 +46,7 @@ Item { anchors.fill: parent fillMode: Image.PreserveAspectFit - source: details === null ? "" : (details.icon_url || "../../images/logobot.svg") + source: details === null ? "" : (details.icon_url || "../../images/placeholder.svg") mipmap: true } } diff --git a/plugins/Toolbox/resources/qml/pages/WelcomePage.qml b/plugins/Toolbox/resources/qml/pages/WelcomePage.qml index cbfdf8f402..f6eef2d390 100644 --- a/plugins/Toolbox/resources/qml/pages/WelcomePage.qml +++ b/plugins/Toolbox/resources/qml/pages/WelcomePage.qml @@ -20,7 +20,7 @@ Column { id: profileImage fillMode: Image.PreserveAspectFit - source: "../../images/logobot.svg" + source: "../../images/placeholder.svg" anchors.horizontalCenter: parent.horizontalCenter width: Math.round(parent.width / 4) } From 35b7ce90d3d543bf055a8666329344d4857d87ea Mon Sep 17 00:00:00 2001 From: Dimitriovski Date: Mon, 24 Feb 2020 11:13:13 +0100 Subject: [PATCH 2/4] Added the placeholder.svg file CURA-7162 --- plugins/Toolbox/resources/images/placeholder.svg | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 plugins/Toolbox/resources/images/placeholder.svg diff --git a/plugins/Toolbox/resources/images/placeholder.svg b/plugins/Toolbox/resources/images/placeholder.svg new file mode 100644 index 0000000000..cc674a4b38 --- /dev/null +++ b/plugins/Toolbox/resources/images/placeholder.svg @@ -0,0 +1,3 @@ + + + From 1acfaf970567e5d3a35e5c2a698b9b63dbe3ac86 Mon Sep 17 00:00:00 2001 From: Dimitriovski Date: Thu, 27 Feb 2020 11:19:44 +0100 Subject: [PATCH 3/4] added sourceSize property to qml's Image for better rendering CURA-7162 --- .../resources/qml/components/ToolboxDownloadsGridTile.qml | 2 ++ .../resources/qml/components/ToolboxDownloadsShowcaseTile.qml | 2 ++ plugins/Toolbox/resources/qml/dialogs/CompatibilityDialog.qml | 4 ++++ .../Toolbox/resources/qml/dialogs/ToolboxLicenseDialog.qml | 2 ++ plugins/Toolbox/resources/qml/pages/ToolboxDetailPage.qml | 4 ++++ 5 files changed, 14 insertions(+) diff --git a/plugins/Toolbox/resources/qml/components/ToolboxDownloadsGridTile.qml b/plugins/Toolbox/resources/qml/components/ToolboxDownloadsGridTile.qml index 51afddb6f3..49c8c4573e 100644 --- a/plugins/Toolbox/resources/qml/components/ToolboxDownloadsGridTile.qml +++ b/plugins/Toolbox/resources/qml/components/ToolboxDownloadsGridTile.qml @@ -66,6 +66,8 @@ Item anchors.centerIn: parent width: UM.Theme.getSize("toolbox_thumbnail_small").width - UM.Theme.getSize("wide_margin").width height: UM.Theme.getSize("toolbox_thumbnail_small").height - UM.Theme.getSize("wide_margin").width + sourceSize.width: width + sourceSize.height: height fillMode: Image.PreserveAspectFit source: model.icon_url || "../../images/placeholder.svg" mipmap: true diff --git a/plugins/Toolbox/resources/qml/components/ToolboxDownloadsShowcaseTile.qml b/plugins/Toolbox/resources/qml/components/ToolboxDownloadsShowcaseTile.qml index 4dae6ac168..1ee38b02e5 100644 --- a/plugins/Toolbox/resources/qml/components/ToolboxDownloadsShowcaseTile.qml +++ b/plugins/Toolbox/resources/qml/components/ToolboxDownloadsShowcaseTile.qml @@ -22,6 +22,8 @@ Rectangle id: thumbnail height: UM.Theme.getSize("toolbox_thumbnail_large").height - 4 * UM.Theme.getSize("default_margin").height width: UM.Theme.getSize("toolbox_thumbnail_large").height - 4 * UM.Theme.getSize("default_margin").height + sourceSize.height: height + sourceSize.width: width fillMode: Image.PreserveAspectFit source: model.icon_url || "../../images/placeholder.svg" mipmap: true diff --git a/plugins/Toolbox/resources/qml/dialogs/CompatibilityDialog.qml b/plugins/Toolbox/resources/qml/dialogs/CompatibilityDialog.qml index 35144d4630..b33036847b 100644 --- a/plugins/Toolbox/resources/qml/dialogs/CompatibilityDialog.qml +++ b/plugins/Toolbox/resources/qml/dialogs/CompatibilityDialog.qml @@ -71,6 +71,8 @@ UM.Dialog{ source: model.icon_url || "../../images/placeholder.svg" height: lineHeight width: height + sourceSize.height: height + sourceSize.width: width mipmap: true fillMode: Image.PreserveAspectFit } @@ -114,6 +116,8 @@ UM.Dialog{ source: model.icon_url || "../../images/placeholder.svg" height: lineHeight width: height + sourceSize.height: height + sourceSize.width: width mipmap: true fillMode: Image.PreserveAspectFit } diff --git a/plugins/Toolbox/resources/qml/dialogs/ToolboxLicenseDialog.qml b/plugins/Toolbox/resources/qml/dialogs/ToolboxLicenseDialog.qml index 17ece52292..6e6df2ee67 100644 --- a/plugins/Toolbox/resources/qml/dialogs/ToolboxLicenseDialog.qml +++ b/plugins/Toolbox/resources/qml/dialogs/ToolboxLicenseDialog.qml @@ -53,6 +53,8 @@ UM.Dialog id: icon width: 30 * screenScaleFactor height: width + sourceSize.width: width + sourceSize.height: height fillMode: Image.PreserveAspectFit source: licenseModel.iconUrl || "../../images/placeholder.svg" mipmap: true diff --git a/plugins/Toolbox/resources/qml/pages/ToolboxDetailPage.qml b/plugins/Toolbox/resources/qml/pages/ToolboxDetailPage.qml index 3917aebb41..3c28763862 100644 --- a/plugins/Toolbox/resources/qml/pages/ToolboxDetailPage.qml +++ b/plugins/Toolbox/resources/qml/pages/ToolboxDetailPage.qml @@ -48,6 +48,10 @@ Item fillMode: Image.PreserveAspectFit source: details === null ? "" : (details.icon_url || "../../images/placeholder.svg") mipmap: true + height: UM.Theme.getSize("toolbox_thumbnail_large").height - 4 * UM.Theme.getSize("default_margin").height + width: UM.Theme.getSize("toolbox_thumbnail_large").height - 4 * UM.Theme.getSize("default_margin").height + sourceSize.height: height + sourceSize.width: width } } From 77cf63acfaca5b49f5e6904b95ddf71141cb8d79 Mon Sep 17 00:00:00 2001 From: Dimitriovski Date: Thu, 27 Feb 2020 11:20:32 +0100 Subject: [PATCH 4/4] Removed the new placeholder from WelcomePage.qml as we probably want to see the Robot there instead of the hexagon. CURA-7162 --- plugins/Toolbox/resources/qml/pages/WelcomePage.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/Toolbox/resources/qml/pages/WelcomePage.qml b/plugins/Toolbox/resources/qml/pages/WelcomePage.qml index f6eef2d390..cbfdf8f402 100644 --- a/plugins/Toolbox/resources/qml/pages/WelcomePage.qml +++ b/plugins/Toolbox/resources/qml/pages/WelcomePage.qml @@ -20,7 +20,7 @@ Column { id: profileImage fillMode: Image.PreserveAspectFit - source: "../../images/placeholder.svg" + source: "../../images/logobot.svg" anchors.horizontalCenter: parent.horizontalCenter width: Math.round(parent.width / 4) }