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 # TODO
- keep scrollbars auto behavior? - update nio requirement
- improve auto completion delegate - improve auto completion delegate
- refresh server list button - refresh server list button

View File

@ -89,13 +89,43 @@ HBox {
implicitWidth: theme.controls.box.defaultWidth * 1.25 implicitWidth: theme.controls.box.defaultWidth * 1.25
contentHeight: window.height contentHeight: window.height
header: HLabel { header: HColumnLayout {
text: qsTr( HLabel {
"Choose a homeserver to create an account on, or the " + text: qsTr(
"homeserver where you have an account to sign in to:" "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 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 { footer: HLabeledItem {

View File

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