More UI tweaking.
This commit is contained in:
parent
f66e62d499
commit
17aa5cbf16
26
matrique.pro
26
matrique.pro
|
@ -69,19 +69,19 @@ mac {
|
||||||
ICON = asset/img/icon.icns
|
ICON = asset/img/icon.icns
|
||||||
}
|
}
|
||||||
|
|
||||||
DISTFILES += \
|
#DISTFILES += \
|
||||||
ChatForm.qml \
|
# ChatForm.qml \
|
||||||
LoginForm.qml \
|
# LoginForm.qml \
|
||||||
main.qml \
|
# main.qml \
|
||||||
Home.qml \
|
# Home.qml \
|
||||||
Login.qml \
|
# Login.qml \
|
||||||
ImageStatus.qml \
|
# ImageStatus.qml \
|
||||||
ButtonDelegate.qml \
|
# ButtonDelegate.qml \
|
||||||
SideNav.qml \
|
# SideNav.qml \
|
||||||
RoomListForm.qml \
|
# RoomListForm.qml \
|
||||||
Room.qml \
|
# Room.qml \
|
||||||
Setting.qml \
|
# Setting.qml \
|
||||||
qml/js/md.js \
|
# qml/js/md.js \
|
||||||
|
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
src/controller.h \
|
src/controller.h \
|
||||||
|
|
|
@ -28,7 +28,13 @@ Page {
|
||||||
|
|
||||||
id: accountSettingsListView
|
id: accountSettingsListView
|
||||||
|
|
||||||
|
boundsBehavior: Flickable.DragOverBounds
|
||||||
|
|
||||||
|
clip: true
|
||||||
|
|
||||||
delegate: Column {
|
delegate: Column {
|
||||||
|
property bool expanded: false
|
||||||
|
|
||||||
spacing: 16
|
spacing: 16
|
||||||
|
|
||||||
SwipeDelegate {
|
SwipeDelegate {
|
||||||
|
@ -79,23 +85,25 @@ Page {
|
||||||
SwipeDelegate.onClicked: matriqueController.logout(connection)
|
SwipeDelegate.onClicked: matriqueController.logout(connection)
|
||||||
}
|
}
|
||||||
|
|
||||||
onClicked: accountSettingsListView.currentIndex == index ? accountSettingsListView.currentIndex = -1 : accountSettingsListView.currentIndex = index
|
onClicked: expanded = !expanded
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
visible: accountSettingsListView.currentIndex == index
|
|
||||||
width: parent.width - 32
|
width: parent.width - 32
|
||||||
|
height: expanded ? implicitHeight : 0
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
|
||||||
|
clip: true
|
||||||
|
|
||||||
ListView {
|
ListView {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: 32
|
Layout.preferredHeight: 32
|
||||||
|
|
||||||
orientation: ListView.Horizontal
|
orientation: ListView.Horizontal
|
||||||
|
|
||||||
model: ["#498882", "#2196F3"]
|
model: ["#498882", "#42a5f5", "#5c6bc0", "#7e57c2", "#ab47bc", "#ff7043"]
|
||||||
|
|
||||||
delegate: Rectangle {
|
delegate: Rectangle {
|
||||||
width: parent.height
|
width: parent.height
|
||||||
|
@ -155,6 +163,10 @@ Page {
|
||||||
readOnly: true
|
readOnly: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Behavior on height {
|
||||||
|
PropertyAnimation { easing.type: Easing.InOutCubic; duration: 200 }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,12 +8,13 @@ import "qrc:/js/util.js" as Util
|
||||||
ItemDelegate {
|
ItemDelegate {
|
||||||
property var page
|
property var page
|
||||||
readonly property bool selected: stackView.currentItem === page
|
readonly property bool selected: stackView.currentItem === page
|
||||||
|
property color highlightColor: Material.accent
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
width: selected ? 4 : 0
|
width: selected ? 4 : 0
|
||||||
height: parent.height
|
height: parent.height
|
||||||
|
|
||||||
color: Material.accent
|
color: highlightColor
|
||||||
|
|
||||||
Behavior on width {
|
Behavior on width {
|
||||||
PropertyAnimation { easing.type: Easing.InOutCubic; duration: 200 }
|
PropertyAnimation { easing.type: Easing.InOutCubic; duration: 200 }
|
||||||
|
|
|
@ -117,6 +117,8 @@ ApplicationWindow {
|
||||||
|
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
|
||||||
|
clip: true
|
||||||
|
|
||||||
delegate: SideNavButton {
|
delegate: SideNavButton {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: width
|
height: width
|
||||||
|
@ -130,6 +132,8 @@ ApplicationWindow {
|
||||||
defaultColor: Material.accent
|
defaultColor: Material.accent
|
||||||
}
|
}
|
||||||
|
|
||||||
|
highlightColor: matriqueController.color(user.id)
|
||||||
|
|
||||||
page: roomPage
|
page: roomPage
|
||||||
|
|
||||||
onClicked: accountListView.currentConnection = connection
|
onClicked: accountListView.currentConnection = connection
|
||||||
|
|
Loading…
Reference in New Issue