This commit is contained in:
Black Hat 2018-09-22 12:36:10 +08:00
parent 7cda6ac325
commit 04d4854352
2 changed files with 31 additions and 53 deletions

View File

@ -37,7 +37,7 @@ Page {
spacing: 8 spacing: 8
SwipeDelegate { ItemDelegate {
width: accountSettingsListView.width width: accountSettingsListView.width
height: 64 height: 64
@ -67,23 +67,6 @@ Page {
} }
} }
swipe.right: Rectangle {
width: parent.height
height: parent.height
anchors.right: parent.right
color: Material.accent
MaterialIcon {
anchors.fill: parent
icon: "\ue879"
color: "white"
}
SwipeDelegate.onClicked: spectralController.logout(connection)
}
onClicked: expanded = !expanded onClicked: expanded = !expanded
} }
@ -164,6 +147,15 @@ Page {
} }
} }
Button {
Layout.fillWidth: true
highlighted: true
text: "Logout"
onClicked: spectralController.logout(connection)
}
Behavior on height { Behavior on height {
PropertyAnimation { easing.type: Easing.InOutCubic; duration: 200 } PropertyAnimation { easing.type: Easing.InOutCubic; duration: 200 }
} }

View File

@ -34,17 +34,17 @@ DEFINES += QT_DEPRECATED_WARNINGS
# You can also select to disable deprecated APIs only up to a certain version of Qt. # You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
SOURCES += src/main.cpp \ SOURCES += $$PWD/src/main.cpp \
src/controller.cpp \ $$PWD/src/controller.cpp \
src/roomlistmodel.cpp \ $$PWD/src/roomlistmodel.cpp \
src/imageprovider.cpp \ $$PWD/src/imageprovider.cpp \
src/messageeventmodel.cpp \ $$PWD/src/messageeventmodel.cpp \
src/emojimodel.cpp \ $$PWD/src/emojimodel.cpp \
src/spectralroom.cpp \ $$PWD/src/spectralroom.cpp \
src/userlistmodel.cpp \ $$PWD/src/userlistmodel.cpp \
src/imageitem.cpp \ $$PWD/src/imageitem.cpp \
src/accountlistmodel.cpp \ $$PWD/src/accountlistmodel.cpp \
src/spectraluser.cpp $$PWD/src/spectraluser.cpp
RESOURCES += \ RESOURCES += \
res.qrc res.qrc
@ -82,28 +82,14 @@ mac {
ICON = asset/img/icon.icns ICON = asset/img/icon.icns
} }
#DISTFILES += \
# ChatForm.qml \
# LoginForm.qml \
# main.qml \
# Home.qml \
# Login.qml \
# ImageStatus.qml \
# ButtonDelegate.qml \
# SideNav.qml \
# RoomListForm.qml \
# Room.qml \
# Setting.qml \
# qml/js/md.js \
HEADERS += \ HEADERS += \
src/controller.h \ $$PWD/src/controller.h \
src/roomlistmodel.h \ $$PWD/src/roomlistmodel.h \
src/imageprovider.h \ $$PWD/src/imageprovider.h \
src/messageeventmodel.h \ $$PWD/src/messageeventmodel.h \
src/emojimodel.h \ $$PWD/src/emojimodel.h \
src/spectralroom.h \ $$PWD/src/spectralroom.h \
src/userlistmodel.h \ $$PWD/src/userlistmodel.h \
src/imageitem.h \ $$PWD/src/imageitem.h \
src/accountlistmodel.h \ $$PWD/src/accountlistmodel.h \
src/spectraluser.h $$PWD/src/spectraluser.h