From 237c360a88897a34ea7abf365c584b9ee04180a9 Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Thu, 18 Oct 2018 15:18:00 +0200 Subject: [PATCH] The size of the avatar image is now themed. Some other small fixes in the AccountDetails componenent were done. Contributes to CURA-5784. --- resources/qml/Account/AccountDetails.qml | 8 ++++---- resources/qml/Account/AvatarImage.qml | 2 ++ resources/themes/cura-light/styles.qml | 2 +- resources/themes/cura-light/theme.json | 2 ++ 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/resources/qml/Account/AccountDetails.qml b/resources/qml/Account/AccountDetails.qml index 27860cfae5..10ee5016cd 100644 --- a/resources/qml/Account/AccountDetails.qml +++ b/resources/qml/Account/AccountDetails.qml @@ -18,8 +18,8 @@ Column AvatarImage { id: avatar - width: 75 * screenScaleFactor - height: 75 * screenScaleFactor + width: UM.Theme.getSize("avatar_image").width + height: UM.Theme.getSize("avatar_image").height anchors.horizontalCenter: parent.horizontalCenter source: loggedIn ? profile["profile_image_url"] : UM.Theme.getImage("avatar_default") outlineColor: loggedIn ? UM.Theme.getColor("account_widget_ouline_active") : UM.Theme.getColor("account_widget_ouline_inactive") @@ -29,8 +29,8 @@ Column { id: information anchors.horizontalCenter: parent.horizontalCenter - visible: !loggedIn - text: loggedIn ? profile["username"] : catalog.i18nc("@label", "Please login or create an account to 
enjoy all features of Ultimaker Cura") + horizontalAlignment: Text.AlignHCenter + text: loggedIn ? profile["username"] : catalog.i18nc("@label", "Please log in or create an account to\nenjoy all features of Ultimaker Cura.") font: loggedIn ? UM.Theme.getFont("large") : UM.Theme.getFont("default") color: UM.Theme.getColor("text") } diff --git a/resources/qml/Account/AvatarImage.qml b/resources/qml/Account/AvatarImage.qml index 0e0d182018..333bce29d7 100644 --- a/resources/qml/Account/AvatarImage.qml +++ b/resources/qml/Account/AvatarImage.qml @@ -1,4 +1,6 @@ // 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 QtGraphicalEffects 1.0 diff --git a/resources/themes/cura-light/styles.qml b/resources/themes/cura-light/styles.qml index 939399efc8..1164b84332 100755 --- a/resources/themes/cura-light/styles.qml +++ b/resources/themes/cura-light/styles.qml @@ -1,4 +1,4 @@ -// Copyright (c) 2017 Ultimaker B.V. +// Copyright (c) 2018 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.1 diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index 285d2724a0..43a0b628b5 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -488,6 +488,8 @@ "toolbox_action_button": [8.0, 2.5], "toolbox_loader": [2.0, 2.0], + "avatar_image": [6.8, 6.8], + "drop_shadow_radius": [1.0, 1.0] } }