wrap/elide: use Layout.fillWidth when possible

This commit is contained in:
miruka 2019-07-16 05:08:27 -04:00
parent 7f46bafc9e
commit d5dd1292ff
8 changed files with 18 additions and 21 deletions

View File

@ -1,4 +1,3 @@
- Can set `Layout.fillWidth: true` to elide/wrap
- Use childrenRect stuff
- Rename theme.bottomElementsHeight
- Account delegate name color

View File

@ -40,11 +40,7 @@ HRectangle {
visible:
bannerRow.width - bannerAvatar.width - bannerButtons.width > 30
Layout.maximumWidth:
bannerRow.width -
bannerAvatar.width - bannerButtons.width -
Layout.leftMargin - Layout.rightMargin
Layout.fillWidth: true
Layout.leftMargin: 5
Layout.rightMargin: Layout.leftMargin
}

View File

@ -38,7 +38,7 @@ HHighlightRectangle {
elide: Text.ElideRight
verticalAlignment: Qt.AlignVCenter
Layout.maximumWidth: parent.width
Layout.fillWidth: true
}
}
}

View File

@ -78,6 +78,7 @@ HGridLayout {
color: Qt.hsla(0, 0, 0.9, 1)
font.pixelSize: theme.fontSize.big
wrapMode: Text.WordWrap
Layout.fillWidth: true
Layout.alignment: Qt.AlignCenter
}

View File

@ -41,7 +41,7 @@ Item {
wrapMode: Text.Wrap
Layout.margins: rememberBox.margins
Layout.maximumWidth: rememberBox.width - Layout.margins * 2
Layout.fillWidth: true
}
HSpacer {}

View File

@ -41,10 +41,11 @@ Column {
HLabel {
id: accountLabel
text: userInfo.displayName || model.userId
elide: HLabel.ElideRight
Layout.fillWidth: true
leftPadding: sidePane.currentSpacing
rightPadding: leftPadding
elide: HLabel.ElideRight
Layout.fillWidth: true
}
HTextField {

View File

@ -45,7 +45,7 @@ HHighlightRectangle {
elide: Text.ElideRight
verticalAlignment: Qt.AlignVCenter
Layout.maximumWidth: parent.width
Layout.fillWidth: true
}
HRichLabel {
@ -73,7 +73,7 @@ HHighlightRectangle {
font.pixelSize: theme.fontSize.small
elide: Text.ElideRight
Layout.maximumWidth: parent.width
Layout.fillWidth: true
}
}
}

View File

@ -86,17 +86,17 @@ Item {
Timer {
// TODO: remove this, debug
id: initialRoomTimer
interval: 2000
interval: 5000
repeat: false
// onTriggered: pageStack.showRoom(
// "@test_mary:matrix.org",
// "Rooms",
// "!TSXGsbBbdwsdylIOJZ:matrix.org"
// )
onTriggered: pageStack.showPage(
"EditAccount/EditAccount",
{"userId": "@test_mary:matrix.org"}
onTriggered: pageStack.showRoom(
"@test_mary:matrix.org",
"Rooms",
"!TSXGsbBbdwsdylIOJZ:matrix.org"
)
// onTriggered: pageStack.showPage(
// "EditAccount/EditAccount",
// {"userId": "@test_mary:matrix.org"}
// )
}
onCurrentItemChanged: if (currentItem) {