Size the avatar icon with the same height as the marketplace button

CURA-8202
This commit is contained in:
Konstantinos Karmas 2021-06-30 15:18:12 +02:00
parent 3c2e336153
commit 9d70ea8a8a
2 changed files with 8 additions and 7 deletions

View File

@ -54,9 +54,10 @@ Item
id: accountWidget id: accountWidget
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: signInButton.horizontalCenter
implicitHeight: UM.Theme.getSize("main_window_header").height implicitHeight: Math.round(0.5 * UM.Theme.getSize("main_window_header").height)
implicitWidth: UM.Theme.getSize("main_window_header").height implicitWidth: Math.round(0.5 * UM.Theme.getSize("main_window_header").height)
hoverEnabled: true hoverEnabled: true
@ -68,8 +69,8 @@ Item
{ {
id: avatar id: avatar
width: Math.round(0.8 * accountWidget.width) width: accountWidget.width
height: Math.round(0.8 * accountWidget.height) height: accountWidget.height
anchors.verticalCenter: accountWidget.verticalCenter anchors.verticalCenter: accountWidget.verticalCenter
anchors.horizontalCenter: accountWidget.horizontalCenter anchors.horizontalCenter: accountWidget.horizontalCenter
@ -86,7 +87,7 @@ Item
{ {
id: initialCircle id: initialCircle
anchors.centerIn: parent anchors.centerIn: parent
width: Math.min(parent.width, parent.height) width: Math.min(accountWidget.width, accountWidget.height)
height: width height: width
radius: width radius: width
color: accountWidget.hovered ? UM.Theme.getColor("primary_text") : "transparent" color: accountWidget.hovered ? UM.Theme.getColor("primary_text") : "transparent"
@ -141,7 +142,7 @@ Item
borderColor: UM.Theme.getColor("lining") borderColor: UM.Theme.getColor("lining")
borderWidth: UM.Theme.getSize("default_lining").width borderWidth: UM.Theme.getSize("default_lining").width
target: Qt.point(width - (accountWidget.width / 2), -10) target: Qt.point(width - (signInButton.width / 2), -10)
arrowSize: UM.Theme.getSize("default_arrow").width arrowSize: UM.Theme.getSize("default_arrow").width
} }

View File

@ -9,7 +9,7 @@ import Cura 1.1 as Cura
Column Column
{ {
spacing: UM.Theme.getSize("narrow_margin").height spacing: UM.Theme.getSize("default_margin").height
topPadding: UM.Theme.getSize("default_margin").height topPadding: UM.Theme.getSize("default_margin").height
bottomPadding: UM.Theme.getSize("default_margin").height bottomPadding: UM.Theme.getSize("default_margin").height
width: childrenRect.width width: childrenRect.width