Make item height static in the sidebar
This fixes #4 but introduces a new bug where the HTML in the strings in the sidebar is not converted to text anymore.
This commit is contained in:
parent
99308a98c9
commit
11cde07393
2 changed files with 26 additions and 9 deletions
|
@ -14,8 +14,7 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
id: item
|
id: item
|
||||||
height: column.height + 20
|
height: d.height + t.height + e.height + 20
|
||||||
width: parent.parent.parent.width
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
@ -31,42 +30,59 @@ Item {
|
||||||
id: column
|
id: column
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
|
||||||
Row {
|
Item {
|
||||||
spacing: 10
|
width: parent.width
|
||||||
|
height: d.height
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
text: feedTitle
|
text: feedTitle
|
||||||
font.pointSize: smallfontSize
|
font.pointSize: smallfontSize
|
||||||
textFormat: Text.PlainText
|
textFormat: Text.PlainText
|
||||||
color: nightmode ? "#888" : "gray"
|
color: nightmode ? "#888" : "gray"
|
||||||
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
wrapMode: Text.WrapAnywhere
|
||||||
renderType: Text.NativeRendering
|
renderType: Text.NativeRendering
|
||||||
|
elide: Text.ElideLeft
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: d.left
|
||||||
|
maximumLineCount: 1
|
||||||
}
|
}
|
||||||
Label {
|
Label {
|
||||||
|
id: d
|
||||||
text: date.toLocaleString(Qt.locale(), Locale.ShortFormat)
|
text: date.toLocaleString(Qt.locale(), Locale.ShortFormat)
|
||||||
font.pointSize: smallfontSize
|
font.pointSize: smallfontSize
|
||||||
textFormat: Text.PlainText
|
textFormat: Text.PlainText
|
||||||
color: nightmode ? "#888" : "gray"
|
color: nightmode ? "#888" : "gray"
|
||||||
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
||||||
renderType: Text.NativeRendering
|
renderType: Text.NativeRendering
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.top: parent.top
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Label {
|
Label {
|
||||||
|
id: t
|
||||||
text: title
|
text: title
|
||||||
color: nightmode ? (read ? "#888" : "#aaa") : (read ? "gray" : "black")
|
color: nightmode ? (read ? "#888" : "#aaa") : (read ? "gray" : "black")
|
||||||
font.pointSize: textFontSize
|
font.pointSize: textFontSize
|
||||||
textFormat: Text.RichText
|
textFormat: Text.PlainText
|
||||||
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
wrapMode: Text.WrapAnywhere
|
||||||
renderType: Text.NativeRendering
|
renderType: Text.NativeRendering
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
elide: Text.ElideRight
|
||||||
|
maximumLineCount: 1
|
||||||
|
|
||||||
}
|
}
|
||||||
Label {
|
Label {
|
||||||
|
id: e
|
||||||
text: excerpt
|
text: excerpt
|
||||||
font.pointSize: smallfontSize
|
font.pointSize: smallfontSize
|
||||||
textFormat: Text.RichText
|
//textFormat: Text.RichText
|
||||||
color: nightmode ? "#888" : "gray"
|
color: nightmode ? "#888" : "gray"
|
||||||
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
wrapMode: Text.WrapAnywhere
|
||||||
renderType: Text.NativeRendering
|
renderType: Text.NativeRendering
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
elide: Text.ElideRight
|
||||||
|
maximumLineCount: 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,6 +41,7 @@ ScrollView {
|
||||||
PostListItem {
|
PostListItem {
|
||||||
textFontSize: item.textFontSize
|
textFontSize: item.textFontSize
|
||||||
nightmode: app.nightmode
|
nightmode: app.nightmode
|
||||||
|
width: listView.width
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue