support for landscape view

This commit is contained in:
molan-git 2020-06-29 15:31:05 +02:00
parent b307fa81be
commit 071d446943
2 changed files with 5 additions and 5 deletions

View file

@ -12,7 +12,7 @@ Item {
property string bg: "" property string bg: ""
width: parent.width width: parent.width
height: avatarImage.height + Theme.paddingLarge*3 + infoLbl.height height: isPortrait ? (avatarImage.height + Theme.paddingLarge*3 + infoLbl.height) : (avatarImage.height + Theme.paddingLarge*2.5 + infoLbl.height)
Rectangle { Rectangle {
id: bgImage id: bgImage
@ -37,7 +37,7 @@ Item {
source: if (avatarImage.status === Image.Error) source: if (avatarImage.status === Image.Error)
source = "../../images/icon-l-profile.svg?" + Theme.primaryColor source = "../../images/icon-l-profile.svg?" + Theme.primaryColor
else image else image
width: Theme.iconSizeLarge width: isPortrait ? Theme.iconSizeLarge : Theme.iconSizeExtraLarge
height: width height: width
anchors { anchors {
left: parent.left left: parent.left
@ -94,7 +94,7 @@ Item {
color: Theme.secondaryHighlightColor color: Theme.secondaryHighlightColor
truncationMode: TruncationMode.Fade truncationMode: TruncationMode.Fade
width: parent.width width: parent.width
height: description === "" ? 0 : contentHeight height: contentHeight
horizontalAlignment: Text.AlignRight horizontalAlignment: Text.AlignRight
} }
} }
@ -106,7 +106,7 @@ Item {
height: followed_by || locked || bot || group ? Theme.iconSizeSmall + Theme.paddingSmall : 0 height: followed_by || locked || bot || group ? Theme.iconSizeSmall + Theme.paddingSmall : 0
anchors { anchors {
top: avatarImage.bottom top: avatarImage.bottom
topMargin: Theme.paddingMedium topMargin: isPortrait ? Theme.paddingMedium : 0
left: parent.left left: parent.left
leftMargin: Theme.horizontalPageMargin leftMargin: Theme.horizontalPageMargin
right: parent.right right: parent.right

View file

@ -265,7 +265,7 @@ BackgroundItem {
left: lblContent.left left: lblContent.left
leftMargin: isPortrait ? 0 : Theme.itemSizeSmall leftMargin: isPortrait ? 0 : Theme.itemSizeSmall
right: lblContent.right right: lblContent.right
rightMargin: isPortrait ? 0 : Theme.itemSizeLarge rightMargin: isPortrait ? 0 : Theme.itemSizeLarge * 1.4
top: lblContent.bottom top: lblContent.bottom
topMargin: Theme.paddingMedium topMargin: Theme.paddingMedium
bottomMargin: Theme.paddingLarge bottomMargin: Theme.paddingLarge