Add a "table header" to server browser

This commit is contained in:
miruka 2020-08-21 10:09:58 -04:00
parent 6160deace5
commit 93b73b86bb
3 changed files with 38 additions and 9 deletions

View File

@ -1,6 +1,6 @@
# TODO
- keep scrollbars auto behavior?
- update nio requirement
- improve auto completion delegate
- refresh server list button

View File

@ -89,13 +89,43 @@ HBox {
implicitWidth: theme.controls.box.defaultWidth * 1.25
contentHeight: window.height
header: HLabel {
header: HColumnLayout {
HLabel {
text: qsTr(
"Choose a homeserver to create an account on, or the " +
"homeserver where you have an account to sign in to:"
)
wrapMode: HLabel.Wrap
padding: theme.spacing
Layout.fillWidth: true
}
HRowLayout {
Repeater {
model: [
qsTr("Ping"),
qsTr("Name & location"),
qsTr("Stability"),
qsTr("Site"),
]
HLabel {
text: modelData
elide: HLabel.ElideRight
topPadding: theme.spacing / 2
bottomPadding: topPadding
leftPadding: theme.spacing / (model.index === 0 ? 2 : 3)
rightPadding: theme.spacing / (model.index === 3 ? 1.5 : 3)
background: Rectangle {
color: theme.controls.button.background
}
Layout.fillWidth: model.index === 1
}
}
}
}
footer: HLabeledItem {

View File

@ -73,7 +73,6 @@ HTile {
HButton {
icon.name: "server-visit-website"
toolTip.text: qsTr("Visit website")
backgroundColor: "transparent"
onClicked: Qt.openUrlExternally(model.site_url)