First commit.

This commit is contained in:
Black Hat
2018-02-23 22:39:14 +08:00
commit c2f01ec1c4
20 changed files with 988 additions and 0 deletions

125
qml/form/ChatForm.qml Normal file
View File

@@ -0,0 +1,125 @@
import QtQuick 2.10
import QtQuick.Controls 2.3
import QtQuick.Layouts 1.3
import QtQuick.Controls.Material 2.3
import QtGraphicalEffects 1.0
import "qrc:/qml/component"
Item {
ColumnLayout {
anchors.fill: parent
Pane {
z: 10
padding: 16
Layout.fillWidth: true
Layout.preferredHeight: 80
background: Rectangle {
color: "#eaeaea"
}
Row {
anchors.fill: parent
spacing: 16
ImageStatus {
width: parent.height
height: parent.height
source: "qrc:/asset/img/avatar.png"
}
Column {
height: parent.height
Text {
text: "Astolfo"
font.pointSize: 18
color: "#424242"
}
Text {
text: "Rider of Black"
color: "#424242"
}
}
}
}
Pane {
Layout.fillWidth: true
Layout.fillHeight: true
}
Pane {
z: 10
padding: 16
Layout.fillWidth: true
Layout.preferredHeight: 80
RowLayout {
anchors.fill: parent
spacing: 0
ItemDelegate {
Layout.preferredWidth: height
Layout.fillHeight: true
contentItem: Text {
text: "\ue226"
color: "#424242"
font.pointSize: 16
font.family: materialFont.name
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
}
TextField {
Layout.fillWidth: true
Layout.fillHeight: true
placeholderText: "Send a Message"
leftPadding: 16
topPadding: 0
bottomPadding: 0
background: Rectangle {
color: "#eaeaea"
}
}
ItemDelegate {
Layout.preferredWidth: height
Layout.fillHeight: true
contentItem: Text {
text: "\ue24e"
color: parent.pressed ? Material.accent : "#424242"
font.pointSize: 16
font.family: materialFont.name
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
background: Rectangle {
color: "#eaeaea"
}
}
ItemDelegate {
Layout.preferredWidth: height
Layout.fillHeight: true
contentItem: Text {
text: "\ue163"
color: "#424242"
font.pointSize: 16
font.family: materialFont.name
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
}
}
}
}
}

View File

@@ -0,0 +1,112 @@
import QtQuick 2.10
import QtQuick.Controls 2.3
import QtQuick.Layouts 1.3
import QtQuick.Controls.Material 2.3
import "qrc:/qml/component"
Item {
ColumnLayout {
anchors.fill: parent
Pane {
Layout.fillWidth: true
Layout.preferredHeight: 250
padding: 32
background: Rectangle {
color: Material.accent
}
Column {
anchors.fill: parent
ImageStatus {
z: 10
width: 96
height: width
source: "qrc:/asset/img/avatar.png"
anchors.horizontalCenter: parent.horizontalCenter
}
Text {
text: "Astolfo"
color: "white"
font.pointSize: 28
anchors.horizontalCenter: parent.horizontalCenter
}
Text {
text: "Rider of Black"
color: "#cdcdcd"
font.pointSize: 12
anchors.horizontalCenter: parent.horizontalCenter
}
Row {
height: 48
anchors.horizontalCenter: parent.horizontalCenter
ItemDelegate {
width: parent.height
height: parent.height
contentItem: Text {
text: "\ue0b7"
font.pointSize: 16
font.family: materialFont.name
color: "white"
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
}
ItemDelegate {
width: parent.height
height: parent.height
contentItem: Text {
text: "\ue62e"
font.pointSize: 16
font.family: materialFont.name
color: "white"
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
}
}
}
}
Pane {
Layout.fillWidth: true
Layout.fillHeight: true
leftPadding: 96
rightPadding: 96
GridLayout {
width: parent.width
columns: 2
flow: GridLayout.LeftToRight
anchors.horizontalCenter: parent.horizontalCenter
columnSpacing: 32
Text {
text: "Matrix ID"
}
Text {
Layout.fillWidth: true
text: "Welcome"
}
Text {
text: "Status"
}
Text {
text: "Overline"
}
}
}
}
}

View File

@@ -0,0 +1,174 @@
import QtQuick 2.10
import QtQuick.Controls 2.3
import QtQuick.Layouts 1.3
import QtGraphicalEffects 1.0
import QtQuick.Controls.Material 2.3
import "qrc:/qml/component"
Item {
ColumnLayout {
anchors.fill: parent
spacing: 0
Pane {
z: 10
Layout.fillWidth: true
Layout.preferredHeight: 80
background: Rectangle {
color: Qt.tint(Material.accent, "#20FFFFFF")
}
TextField {
id: serverField
width: parent.width
height: 36
leftPadding: 16
topPadding: 0
bottomPadding: 0
anchors.verticalCenter: parent.verticalCenter
background: Item {
Row {
anchors.fill: parent
Text {
width: parent.height
height: parent.height
text: "\ue8b6"
font.pointSize: 16
font.family: materialFont.name
color: "white"
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
Text {
height: parent.height
text: "Search"
color: "white"
font.pointSize: 12
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
}
Rectangle {
width: serverField.activeFocus || serverField.text != "" ? parent.width : 0
height: parent.height
color: "white"
Behavior on width {
PropertyAnimation { easing.type: Easing.InOutQuad; duration: 200 }
}
}
}
}
}
Pane {
Layout.fillWidth: true
Layout.fillHeight: true
padding: 0
background: Rectangle {
color: "#eaeaea"
}
ListModel {
id: listModel
ListElement {
name: "Bill Smith"
number: "555 3264"
}
ListElement {
name: "John Brown"
number: "555 8426"
}
ListElement {
name: "Sam Wise"
number: "555 0473"
}
ListElement {
name: "Bill Smith"
number: "555 3264"
}
ListElement {
name: "John Brown"
number: "555 8426"
}
ListElement {
name: "Sam Wise"
number: "555 0473"
}
ListElement {
name: "Bill Smith"
number: "555 3264"
}
ListElement {
name: "John Brown"
number: "555 8426"
}
ListElement {
name: "Sam Wise"
number: "555 0473"
}
ListElement {
name: "Bill Smith"
number: "555 3264"
}
ListElement {
name: "John Brown"
number: "555 8426"
}
ListElement {
name: "Sam Wise"
number: "555 0473"
}
}
ListView {
id: listView
width: parent.width
height: parent.height
model: listModel
highlight: Rectangle {
color: Material.accent
opacity: 0.2
}
ScrollBar.vertical: ScrollBar { id: scrollBar }
delegate: ItemDelegate {
width: parent.width
height: 80
onClicked: listView.currentIndex = index
contentItem: Item {
Row {
spacing: 16
ImageStatus {
width: parent.height
height: parent.height
source: "qrc:/asset/img/avatar.png"
}
Column {
Text {
text: name
color: "#424242"
}
Text {
text: number
color: "#424242"
}
}
}
}
}
}
}
}
}