diff --git a/imports/Spectral/Component/AutoListView.qml b/imports/Spectral/Component/AutoListView.qml
index 2b6bddb..1fca551 100644
--- a/imports/Spectral/Component/AutoListView.qml
+++ b/imports/Spectral/Component/AutoListView.qml
@@ -1,4 +1,4 @@
-import QtQuick 2.9
+import QtQuick 2.12
ListView {
ScrollHelper {
diff --git a/imports/Spectral/Component/AutoMouseArea.qml b/imports/Spectral/Component/AutoMouseArea.qml
index ceaf84d..124625b 100644
--- a/imports/Spectral/Component/AutoMouseArea.qml
+++ b/imports/Spectral/Component/AutoMouseArea.qml
@@ -1,4 +1,4 @@
-import QtQuick 2.9
+import QtQuick 2.12
import Spectral.Setting 0.1
diff --git a/imports/Spectral/Component/AutoTextField.qml b/imports/Spectral/Component/AutoTextField.qml
index 8bd6bac..ec07de6 100644
--- a/imports/Spectral/Component/AutoTextField.qml
+++ b/imports/Spectral/Component/AutoTextField.qml
@@ -1,5 +1,5 @@
-import QtQuick 2.9
-import QtQuick.Controls 2.2
+import QtQuick 2.12
+import QtQuick.Controls 2.4
TextField {
selectByMouse: true
diff --git a/imports/Spectral/Component/Avatar.qml b/imports/Spectral/Component/Avatar.qml
index be95df5..e80d213 100644
--- a/imports/Spectral/Component/Avatar.qml
+++ b/imports/Spectral/Component/Avatar.qml
@@ -1,5 +1,5 @@
-import QtQuick 2.9
-import QtQuick.Controls 2.2
+import QtQuick 2.12
+import QtQuick.Controls 2.4
import QtGraphicalEffects 1.0
Item {
diff --git a/imports/Spectral/Component/Emoji/EmojiPicker.qml b/imports/Spectral/Component/Emoji/EmojiPicker.qml
index c875488..c3520f1 100644
--- a/imports/Spectral/Component/Emoji/EmojiPicker.qml
+++ b/imports/Spectral/Component/Emoji/EmojiPicker.qml
@@ -1,7 +1,7 @@
-import QtQuick 2.9
-import QtQuick.Controls 2.2
+import QtQuick 2.12
+import QtQuick.Controls 2.4
import QtQuick.Layouts 1.3
-import QtQuick.Controls.Material 2.2
+import QtQuick.Controls.Material 2.4
import Spectral.Component 2.0
diff --git a/imports/Spectral/Component/MaterialIcon.qml b/imports/Spectral/Component/MaterialIcon.qml
index 593b232..35ee4a1 100644
--- a/imports/Spectral/Component/MaterialIcon.qml
+++ b/imports/Spectral/Component/MaterialIcon.qml
@@ -1,7 +1,7 @@
-import QtQuick 2.9
-import QtQuick.Controls 2.2
+import QtQuick 2.12
+import QtQuick.Controls 2.4
import QtQuick.Layouts 1.3
-import QtQuick.Controls.Material 2.2
+import QtQuick.Controls.Material 2.4
import Spectral.Setting 0.1
import Spectral.Font 0.1
diff --git a/imports/Spectral/Component/ScrollHelper.qml b/imports/Spectral/Component/ScrollHelper.qml
index 25714f0..7a9779a 100644
--- a/imports/Spectral/Component/ScrollHelper.qml
+++ b/imports/Spectral/Component/ScrollHelper.qml
@@ -1,5 +1,5 @@
-import QtQuick 2.9
-import QtQuick.Controls 2.2
+import QtQuick 2.12
+import QtQuick.Controls 2.4
MouseArea {
id: root
diff --git a/imports/Spectral/Component/SplitView.qml b/imports/Spectral/Component/SplitView.qml
index 4f176fa..e4302bb 100644
--- a/imports/Spectral/Component/SplitView.qml
+++ b/imports/Spectral/Component/SplitView.qml
@@ -37,8 +37,8 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Controls 2.2
+import QtQuick 2.12
+import QtQuick.Controls 2.4
import QtQuick.Layouts 1.3
import QtQuick.Window 2.1
import Spectral.Setting 0.1
diff --git a/imports/Spectral/Component/Timeline/DownloadableContent.qml b/imports/Spectral/Component/Timeline/DownloadableContent.qml
index ba586d4..2457424 100644
--- a/imports/Spectral/Component/Timeline/DownloadableContent.qml
+++ b/imports/Spectral/Component/Timeline/DownloadableContent.qml
@@ -1,6 +1,6 @@
-import QtQuick 2.9
-import QtQuick.Controls 2.2
-import QtQuick.Controls.Material 2.2
+import QtQuick 2.12
+import QtQuick.Controls 2.4
+import QtQuick.Controls.Material 2.4
import Qt.labs.platform 1.0
Item {
diff --git a/imports/Spectral/Component/Timeline/ImageDelegate.qml b/imports/Spectral/Component/Timeline/ImageDelegate.qml
index 71e032e..6f03100 100644
--- a/imports/Spectral/Component/Timeline/ImageDelegate.qml
+++ b/imports/Spectral/Component/Timeline/ImageDelegate.qml
@@ -1,7 +1,7 @@
-import QtQuick 2.9
-import QtQuick.Controls 2.2
+import QtQuick 2.12
+import QtQuick.Controls 2.4
import QtQuick.Layouts 1.3
-import QtQuick.Controls.Material 2.2
+import QtQuick.Controls.Material 2.4
import QtGraphicalEffects 1.0
import Spectral 0.1
@@ -11,8 +11,6 @@ import Spectral.Component 2.0
import Spectral.Font 0.1
ColumnLayout {
- readonly property int alignment: sentByMe ? Qt.AlignRight : Qt.AlignLeft
-
readonly property bool avatarVisible: !sentByMe && (aboveAuthor !== author || aboveSection !== section || aboveEventType === "state" || aboveEventType === "emote" || aboveEventType === "other")
readonly property bool sentByMe: author === currentRoom.localUser
diff --git a/imports/Spectral/Component/Timeline/MessageDelegate.qml b/imports/Spectral/Component/Timeline/MessageDelegate.qml
index e58ed3e..ca66bdc 100644
--- a/imports/Spectral/Component/Timeline/MessageDelegate.qml
+++ b/imports/Spectral/Component/Timeline/MessageDelegate.qml
@@ -1,7 +1,7 @@
-import QtQuick 2.9
-import QtQuick.Controls 2.2
+import QtQuick 2.12
+import QtQuick.Controls 2.4
import QtQuick.Layouts 1.3
-import QtQuick.Controls.Material 2.2
+import QtQuick.Controls.Material 2.4
import Spectral 0.1
import Spectral.Setting 0.1
@@ -10,14 +10,14 @@ import Spectral.Component 2.0
import Spectral.Font 0.1
ColumnLayout {
- readonly property int alignment: sentByMe ? Qt.AlignRight : Qt.AlignLeft
-
readonly property bool avatarVisible: !sentByMe && (aboveAuthor !== author || aboveSection !== section || aboveEventType === "state" || aboveEventType === "emote" || aboveEventType === "other")
readonly property bool sentByMe: author === currentRoom.localUser
signal saveFileAs()
signal openExternally()
+ Layout.alignment: sentByMe ? Qt.AlignRight : Qt.AlignLeft
+
id: root
spacing: 0
@@ -34,8 +34,6 @@ ColumnLayout {
}
RowLayout {
- Layout.alignment: sentByMe ? Qt.AlignRight : Qt.AlignLeft
-
z: -5
id: messageRow
diff --git a/imports/Spectral/Component/Timeline/SectionDelegate.qml b/imports/Spectral/Component/Timeline/SectionDelegate.qml
index 6db3e26..d022135 100644
--- a/imports/Spectral/Component/Timeline/SectionDelegate.qml
+++ b/imports/Spectral/Component/Timeline/SectionDelegate.qml
@@ -1,5 +1,5 @@
-import QtQuick 2.9
-import QtQuick.Controls 2.2
+import QtQuick 2.12
+import QtQuick.Controls 2.4
Label {
text: section + " • " + Qt.formatTime(time, "hh:mm")
diff --git a/imports/Spectral/Component/Timeline/StateDelegate.qml b/imports/Spectral/Component/Timeline/StateDelegate.qml
index 2c3a262..2c4c20a 100644
--- a/imports/Spectral/Component/Timeline/StateDelegate.qml
+++ b/imports/Spectral/Component/Timeline/StateDelegate.qml
@@ -1,13 +1,11 @@
-import QtQuick 2.9
-import QtQuick.Controls 2.2
+import QtQuick 2.12
+import QtQuick.Controls 2.4
import QtQuick.Layouts 1.3
-import QtQuick.Controls.Material 2.2
+import QtQuick.Controls.Material 2.4
import Spectral.Setting 0.1
Label {
- readonly property int alignment: Qt.AlignHCenter
-
text: "" + author.displayName + " " + display
color: Material.accent
diff --git a/imports/Spectral/Component/Timeline/TimelineImage.qml b/imports/Spectral/Component/Timeline/TimelineImage.qml
deleted file mode 100644
index c7050de..0000000
--- a/imports/Spectral/Component/Timeline/TimelineImage.qml
+++ /dev/null
@@ -1,34 +0,0 @@
-import QtQuick 2.9
-import QtQuick.Controls 2.2
-
-Item {
- property alias source: baseImage.source
- property alias sourceSize: baseImage.sourceSize.width
-
- readonly property bool loading: baseImage.status == Image.Loading
-
- signal clicked()
-
- width: loading ? 128 : baseImage.implicitWidth
- height: loading ? progressBar.height : baseImage.implicitHeight
-
- id: rekt
-
- Image { id: baseImage }
-
- ProgressBar {
- width: parent.width
- visible: loading
-
- id: progressBar
-
- indeterminate: true
- }
-
- MouseArea {
- anchors.fill: parent
- propagateComposedEvents: true
-
- onClicked: rekt.clicked()
- }
-}
diff --git a/imports/Spectral/Component/Timeline/TimelineLabel.qml b/imports/Spectral/Component/Timeline/TimelineLabel.qml
deleted file mode 100644
index f64751f..0000000
--- a/imports/Spectral/Component/Timeline/TimelineLabel.qml
+++ /dev/null
@@ -1,17 +0,0 @@
-import QtQuick 2.9
-import QtQuick.Controls 2.2
-import QtQuick.Controls.Material 2.2
-
-import Spectral.Setting 0.1
-
-Label {
- property bool coloredBackground
-
- color: coloredBackground ? "white": Material.foreground
-
- wrapMode: Label.Wrap
- linkColor: coloredBackground ? "white" : Material.accent
- textFormat: Text.RichText
-
- onLinkActivated: Qt.openUrlExternally(link)
-}
diff --git a/imports/Spectral/Effect/CircleMask.qml b/imports/Spectral/Effect/CircleMask.qml
index fc59f40..184861e 100644
--- a/imports/Spectral/Effect/CircleMask.qml
+++ b/imports/Spectral/Effect/CircleMask.qml
@@ -1,4 +1,4 @@
-import QtQuick 2.9
+import QtQuick 2.12
import QtGraphicalEffects 1.0
Item {
diff --git a/imports/Spectral/Effect/ElevationEffect.qml b/imports/Spectral/Effect/ElevationEffect.qml
index 423c492..0299fd5 100644
--- a/imports/Spectral/Effect/ElevationEffect.qml
+++ b/imports/Spectral/Effect/ElevationEffect.qml
@@ -1,4 +1,4 @@
-import QtQuick 2.9
+import QtQuick 2.12
import QtGraphicalEffects 1.0
/*!
diff --git a/imports/Spectral/Effect/RippleEffect.qml b/imports/Spectral/Effect/RippleEffect.qml
index 4432e21..9749aa9 100644
--- a/imports/Spectral/Effect/RippleEffect.qml
+++ b/imports/Spectral/Effect/RippleEffect.qml
@@ -1,5 +1,5 @@
-import QtQuick 2.9
-import QtQuick.Controls 2.2
+import QtQuick 2.12
+import QtQuick.Controls 2.4
import QtGraphicalEffects 1.0
import Spectral.Component 2.0
diff --git a/imports/Spectral/Font/CommonFont.qml b/imports/Spectral/Font/CommonFont.qml
index f221ef2..efe053d 100644
--- a/imports/Spectral/Font/CommonFont.qml
+++ b/imports/Spectral/Font/CommonFont.qml
@@ -1,6 +1,6 @@
pragma Singleton
-import QtQuick 2.9
-import QtQuick.Controls 2.2
+import QtQuick 2.12
+import QtQuick.Controls 2.4
Item {
property alias font: materialLabel.font
diff --git a/imports/Spectral/Font/MaterialFont.qml b/imports/Spectral/Font/MaterialFont.qml
index 312fe23..c1a3d66 100644
--- a/imports/Spectral/Font/MaterialFont.qml
+++ b/imports/Spectral/Font/MaterialFont.qml
@@ -1,5 +1,5 @@
pragma Singleton
-import QtQuick 2.9
+import QtQuick 2.12
FontLoader {
source: "qrc:/assets/font/material.ttf"
diff --git a/imports/Spectral/Menu/MessageContextMenu.qml b/imports/Spectral/Menu/MessageContextMenu.qml
index 62c7c74..802e07b 100644
--- a/imports/Spectral/Menu/MessageContextMenu.qml
+++ b/imports/Spectral/Menu/MessageContextMenu.qml
@@ -1,5 +1,5 @@
-import QtQuick 2.9
-import QtQuick.Controls 2.2
+import QtQuick 2.12
+import QtQuick.Controls 2.4
Menu {
property var root: null
diff --git a/imports/Spectral/Menu/RoomContextMenu.qml b/imports/Spectral/Menu/RoomContextMenu.qml
index 8c5b1a6..497f79a 100644
--- a/imports/Spectral/Menu/RoomContextMenu.qml
+++ b/imports/Spectral/Menu/RoomContextMenu.qml
@@ -1,5 +1,5 @@
-import QtQuick 2.9
-import QtQuick.Controls 2.2
+import QtQuick 2.12
+import QtQuick.Controls 2.4
import Spectral 0.1
Menu {
diff --git a/imports/Spectral/Panel/RoomDrawer.qml b/imports/Spectral/Panel/RoomDrawer.qml
index 2221b5b..9cdc0d0 100644
--- a/imports/Spectral/Panel/RoomDrawer.qml
+++ b/imports/Spectral/Panel/RoomDrawer.qml
@@ -1,6 +1,6 @@
-import QtQuick 2.9
-import QtQuick.Controls 2.2
-import QtQuick.Controls.Material 2.2
+import QtQuick 2.12
+import QtQuick.Controls 2.4
+import QtQuick.Controls.Material 2.4
import QtQuick.Layouts 1.3
import Spectral.Component 2.0
diff --git a/imports/Spectral/Panel/RoomHeader.qml b/imports/Spectral/Panel/RoomHeader.qml
index e3c95ff..eb291d5 100644
--- a/imports/Spectral/Panel/RoomHeader.qml
+++ b/imports/Spectral/Panel/RoomHeader.qml
@@ -1,7 +1,7 @@
-import QtQuick 2.9
-import QtQuick.Controls 2.2
+import QtQuick 2.12
+import QtQuick.Controls 2.4
import QtQuick.Layouts 1.3
-import QtQuick.Controls.Material 2.2
+import QtQuick.Controls.Material 2.4
import Spectral 0.1
import Spectral.Effect 2.0
diff --git a/imports/Spectral/Panel/RoomListPanel.qml b/imports/Spectral/Panel/RoomListPanel.qml
index 7d9dc3d..a341ec6 100644
--- a/imports/Spectral/Panel/RoomListPanel.qml
+++ b/imports/Spectral/Panel/RoomListPanel.qml
@@ -1,8 +1,8 @@
-import QtQuick 2.9
-import QtQuick.Controls 2.2
+import QtQuick 2.12
+import QtQuick.Controls 2.4
import QtQuick.Layouts 1.3
-import QtQuick.Controls.Material 2.2
+import QtQuick.Controls.Material 2.4
import Spectral.Component 2.0
import Spectral.Menu 2.0
diff --git a/imports/Spectral/Panel/RoomPanel.qml b/imports/Spectral/Panel/RoomPanel.qml
index 8e0bca3..db01b53 100644
--- a/imports/Spectral/Panel/RoomPanel.qml
+++ b/imports/Spectral/Panel/RoomPanel.qml
@@ -1,7 +1,7 @@
-import QtQuick 2.9
-import QtQuick.Controls 2.2
+import QtQuick 2.12
+import QtQuick.Controls 2.4
import QtQuick.Layouts 1.3
-import QtQuick.Controls.Material 2.2
+import QtQuick.Controls.Material 2.4
import Qt.labs.qmlmodels 1.0
import Spectral.Component 2.0
@@ -70,36 +70,6 @@ Item {
onClicked: roomDrawer.open()
}
- DelegateChooser {
- id: delegateChooser
-
- role: "eventType"
- choices: [
- DelegateChoice {
- roleValue: "state"
- delegate: StateDelegate {
- width: messageListView.width
- }
- },
- DelegateChoice {
- roleValue: "emote"
- delegate: StateDelegate {}
- },
- DelegateChoice {
- roleValue: "message"
- delegate: MessageDelegate {}
- },
- DelegateChoice {
- roleValue: "notice"
- delegate: MessageDelegate {}
- },
- DelegateChoice {
- roleValue: "image"
- delegate: ImageDelegate {}
- }
- ]
- }
-
AutoListView {
Layout.fillWidth: true
Layout.maximumWidth: 960
@@ -152,7 +122,105 @@ Item {
}
}
- delegate: delegateChooser
+ delegate: DelegateChooser {
+ role: "eventType"
+
+ DelegateChoice {
+ roleValue: "state"
+ delegate: ColumnLayout {
+ width: messageListView.width
+ spacing: 4
+
+ SectionDelegate {
+ Layout.alignment: Qt.AlignHCenter
+ Layout.margins: 4
+
+ visible: section !== aboveSection || Math.abs(time - aboveTime) > 600000
+ }
+
+ StateDelegate {
+ Layout.maximumWidth: parent.width
+ Layout.alignment: Qt.AlignHCenter
+ }
+ }
+ }
+
+ DelegateChoice {
+ roleValue: "emote"
+ delegate: ColumnLayout {
+ width: messageListView.width
+ spacing: 4
+
+ SectionDelegate {
+ Layout.alignment: Qt.AlignHCenter
+ Layout.margins: 4
+
+ visible: section !== aboveSection || Math.abs(time - aboveTime) > 600000
+ }
+
+ StateDelegate {
+ Layout.maximumWidth: parent.width
+ Layout.alignment: Qt.AlignHCenter
+ }
+ }
+ }
+
+ DelegateChoice {
+ roleValue: "message"
+ delegate: ColumnLayout {
+ width: messageListView.width
+ spacing: 4
+
+ SectionDelegate {
+ Layout.alignment: Qt.AlignHCenter
+ Layout.margins: 4
+
+ visible: section !== aboveSection || Math.abs(time - aboveTime) > 600000
+ }
+
+ MessageDelegate {
+ }
+ }
+ }
+
+ DelegateChoice {
+ roleValue: "notice"
+ delegate: ColumnLayout {
+ width: messageListView.width
+ spacing: 4
+
+ SectionDelegate {
+ Layout.alignment: Qt.AlignHCenter
+ Layout.margins: 4
+
+ visible: section !== aboveSection || Math.abs(time - aboveTime) > 600000
+ }
+
+ MessageDelegate {
+ }
+ }
+ }
+
+ DelegateChoice {
+ roleValue: "image"
+ delegate: ColumnLayout {
+ width: messageListView.width
+ spacing: 4
+
+ SectionDelegate {
+ Layout.alignment: Qt.AlignHCenter
+ Layout.margins: 4
+
+ visible: section !== aboveSection || Math.abs(time - aboveTime) > 600000
+ }
+
+ ImageDelegate {
+ Layout.maximumWidth: parent.width
+ Layout.alignment: Qt.AlignHCenter
+ }
+ }
+ }
+ }
RoundButton {
width: 64
diff --git a/imports/Spectral/Panel/RoomPanelInput.qml b/imports/Spectral/Panel/RoomPanelInput.qml
index c558745..e6ecec6 100644
--- a/imports/Spectral/Panel/RoomPanelInput.qml
+++ b/imports/Spectral/Panel/RoomPanelInput.qml
@@ -1,7 +1,7 @@
-import QtQuick 2.9
-import QtQuick.Controls 2.2
+import QtQuick 2.12
+import QtQuick.Controls 2.4
import QtQuick.Layouts 1.3
-import QtQuick.Controls.Material 2.2
+import QtQuick.Controls.Material 2.4
import Spectral.Component 2.0
import Spectral.Component.Emoji 2.0
@@ -167,6 +167,8 @@ Control {
spacing: 0
ToolButton {
+ Layout.preferredWidth: 48
+ Layout.preferredHeight: 48
Layout.alignment: Qt.AlignBottom
id: uploadButton
@@ -186,6 +188,8 @@ Control {
}
ToolButton {
+ Layout.preferredWidth: 48
+ Layout.preferredHeight: 48
Layout.alignment: Qt.AlignBottom
id: cancelReplyButton
@@ -364,6 +368,8 @@ Control {
}
ToolButton {
+ Layout.preferredWidth: 48
+ Layout.preferredHeight: 48
Layout.alignment: Qt.AlignBottom
id: emojiButton
diff --git a/imports/Spectral/Setting/Setting.qml b/imports/Spectral/Setting/Setting.qml
index 3eb48c1..fb7a966 100644
--- a/imports/Spectral/Setting/Setting.qml
+++ b/imports/Spectral/Setting/Setting.qml
@@ -1,5 +1,5 @@
pragma Singleton
-import QtQuick 2.9
+import QtQuick 2.12
import Qt.labs.settings 1.0
Settings {
diff --git a/include/libqmatrixclient b/include/libqmatrixclient
index 52081fe..be7d25e 160000
--- a/include/libqmatrixclient
+++ b/include/libqmatrixclient
@@ -1 +1 @@
-Subproject commit 52081fe91724e5f2a82c55f0e6230d8841dd859a
+Subproject commit be7d25ed22abd07a254bfb8ff6c30de4fcc79e6a
diff --git a/qml/main.qml b/qml/main.qml
index dd7ca62..228c610 100644
--- a/qml/main.qml
+++ b/qml/main.qml
@@ -1,7 +1,7 @@
-import QtQuick 2.9
-import QtQuick.Controls 2.2
+import QtQuick 2.12
+import QtQuick.Controls 2.4
import QtQuick.Layouts 1.3
-import QtQuick.Controls.Material 2.2
+import QtQuick.Controls.Material 2.4
import Qt.labs.settings 1.0
import Qt.labs.platform 1.0 as Platform
diff --git a/qtquickcontrols2.conf b/qtquickcontrols2.conf
index 6ed3a49..c594d10 100644
--- a/qtquickcontrols2.conf
+++ b/qtquickcontrols2.conf
@@ -7,6 +7,7 @@ Style=Material
[Material]
Theme=Light
+Variant=Dense
Primary=#344955
Accent=#673AB7
Foreground=#1D333E
diff --git a/res.qrc b/res.qrc
index 9ae861e..a1b0934 100644
--- a/res.qrc
+++ b/res.qrc
@@ -33,8 +33,6 @@
imports/Spectral/Panel/RoomHeader.qml
imports/Spectral/Component/ScrollHelper.qml
imports/Spectral/Component/AutoListView.qml
- imports/Spectral/Component/Timeline/TimelineImage.qml
- imports/Spectral/Component/Timeline/TimelineLabel.qml
imports/Spectral/Component/AutoTextField.qml
imports/Spectral/Panel/RoomPanelInput.qml
imports/Spectral/Component/SplitView.qml