The size of the avatar image is now themed.

Some other small fixes in the AccountDetails componenent were done.

Contributes to CURA-5784.
This commit is contained in:
Diego Prado Gesto 2018-10-18 15:18:00 +02:00
parent a4c609d514
commit 237c360a88
4 changed files with 9 additions and 5 deletions

View File

@ -18,8 +18,8 @@ Column
AvatarImage AvatarImage
{ {
id: avatar id: avatar
width: 75 * screenScaleFactor width: UM.Theme.getSize("avatar_image").width
height: 75 * screenScaleFactor height: UM.Theme.getSize("avatar_image").height
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
source: loggedIn ? profile["profile_image_url"] : UM.Theme.getImage("avatar_default") 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") outlineColor: loggedIn ? UM.Theme.getColor("account_widget_ouline_active") : UM.Theme.getColor("account_widget_ouline_inactive")
@ -29,8 +29,8 @@ Column
{ {
id: information id: information
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
visible: !loggedIn horizontalAlignment: Text.AlignHCenter
text: loggedIn ? profile["username"] : catalog.i18nc("@label", "Please login or create an account to enjoy all features of Ultimaker Cura") 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") font: loggedIn ? UM.Theme.getFont("large") : UM.Theme.getFont("default")
color: UM.Theme.getColor("text") color: UM.Theme.getColor("text")
} }

View File

@ -1,4 +1,6 @@
// Copyright (c) 2018 Ultimaker B.V. // Copyright (c) 2018 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.7 import QtQuick 2.7
import QtQuick.Controls 2.1 import QtQuick.Controls 2.1
import QtGraphicalEffects 1.0 import QtGraphicalEffects 1.0

View File

@ -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. // Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.1 import QtQuick 2.1

View File

@ -488,6 +488,8 @@
"toolbox_action_button": [8.0, 2.5], "toolbox_action_button": [8.0, 2.5],
"toolbox_loader": [2.0, 2.0], "toolbox_loader": [2.0, 2.0],
"avatar_image": [6.8, 6.8],
"drop_shadow_radius": [1.0, 1.0] "drop_shadow_radius": [1.0, 1.0]
} }
} }