fix(@desktop/welcome) adjust welcome page

Fixes #6820
This commit is contained in:
PavelS 2022-08-09 17:41:23 +03:00 committed by PavelS
parent ac961062c8
commit da517f5888
3 changed files with 18 additions and 3 deletions

View File

@ -58,6 +58,8 @@ MenuItem {
image: root.image image: root.image
colorId: root.colorId colorId: root.colorId
colorHash: root.colorHash colorHash: root.colorHash
imageHeight: Constants.onboarding.userImageHeight
imageWidth: Constants.onboarding.userImageWidth
} }
} }

View File

@ -175,7 +175,7 @@ Item {
id: title id: title
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
font.weight: Font.Bold font.weight: Font.Bold
font.pixelSize: Constants.keycard.general.fontSize1 font.pixelSize: Constants.onboarding.titleFontSize
color: Theme.palette.directColor1 color: Theme.palette.directColor1
} }
@ -184,6 +184,7 @@ Item {
height: userImage.height height: userImage.height
width: 318 width: 318
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
Layout.topMargin: Style.current.xlPadding
UserImage { UserImage {
id: userImage id: userImage
@ -192,6 +193,8 @@ Item {
colorId: root.startupStore.selectedLoginAccount.colorId colorId: root.startupStore.selectedLoginAccount.colorId
colorHash: root.startupStore.selectedLoginAccount.colorHash colorHash: root.startupStore.selectedLoginAccount.colorHash
anchors.left: parent.left anchors.left: parent.left
imageHeight: Constants.onboarding.userImageHeight
imageWidth: Constants.onboarding.userImageWidth
} }
StatusBaseText { StatusBaseText {
@ -228,6 +231,7 @@ Item {
id: changeAccountBtn id: changeAccountBtn
objectName: "loginChangeAccountButton" objectName: "loginChangeAccountButton"
icon.name: "chevron-down" icon.name: "chevron-down"
icon.rotation: accountsPopup.opened ? 180 : 0
type: StatusFlatRoundButton.Type.Tertiary type: StatusFlatRoundButton.Type.Tertiary
width: 24 width: 24
height: 24 height: 24
@ -238,7 +242,10 @@ Item {
if (accountsPopup.opened) { if (accountsPopup.opened) {
accountsPopup.close() accountsPopup.close()
} else { } else {
accountsPopup.popup(userInfo, 0, userInfo.height+4) accountsPopup.popup(
userInfo,
(userInfo.width - accountsPopup.width) / 2,
userInfo.height + Style.current.halfPadding)
} }
} }
} }
@ -246,7 +253,7 @@ Item {
StatusPopupMenu { StatusPopupMenu {
id: accountsPopup id: accountsPopup
closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutsideParent closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutsideParent
width: parent.width width: parent.width + Style.current.bigPadding
dim: false dim: false
Repeater { Repeater {
id: accounts id: accounts

View File

@ -126,6 +126,12 @@ QtObject {
readonly property int inactive: 4 readonly property int inactive: 4
} }
readonly property QtObject onboarding: QtObject {
readonly property int userImageWidth: 40
readonly property int userImageHeight: 40
readonly property int titleFontSize: 17
}
readonly property QtObject onlineStatus: QtObject{ readonly property QtObject onlineStatus: QtObject{
readonly property int inactive: 0 readonly property int inactive: 0
readonly property int online: 1 readonly property int online: 1