diff --git a/TODO.md b/TODO.md index c0179ff7..42bc9b06 100644 --- a/TODO.md +++ b/TODO.md @@ -22,7 +22,6 @@ - Register/Forgot? for SignIn dialog - Scaling - See [Text.fontSizeMode](https://doc.qt.io/qt-5/qml-qtquick-text.html#fontSizeMode-prop) - - Test HGlassRectangle elements when no effects are available - Add room - Leave room - Forget room warning popup diff --git a/harmonyqml/components/Base/HGlassRectangle.qml b/harmonyqml/components/Base/HGlassRectangle.qml deleted file mode 100644 index 72ecd152..00000000 --- a/harmonyqml/components/Base/HGlassRectangle.qml +++ /dev/null @@ -1,38 +0,0 @@ -import QtQuick 2.7 -import QtGraphicalEffects 1.0 - -Item { - property bool isPageStackDescendant: true - - default property alias children: rectangle.children - property alias color: rectangle.color - property alias gradient: rectangle.gradient - property alias blurRadius: fastBlur.radius - property alias border: rectangle.border - property alias radius: rectangle.radius - - ShaderEffectSource { - id: effectSource - sourceItem: mainUIBackground - anchors.fill: parent - sourceRect: Qt.rect( - (isPageStackDescendant ? pageStack.x : 0) + parent.x, - (isPageStackDescendant ? pageStack.y : 0) + parent.y, - width, - height - ) - } - - FastBlur { - id: fastBlur - anchors.fill: effectSource - source: effectSource - radius: rectangle.color == "#00000000" ? 0 : 8 - } - - Rectangle { - id: rectangle - anchors.fill: parent - color: HStyle.sidePane.background - } -} diff --git a/harmonyqml/components/Base/HRectangle.qml b/harmonyqml/components/Base/HRectangle.qml new file mode 100644 index 00000000..9cd18189 --- /dev/null +++ b/harmonyqml/components/Base/HRectangle.qml @@ -0,0 +1,6 @@ +import QtQuick 2.7 + +Rectangle { + id: rectangle + color: HStyle.sidePane.background +} diff --git a/harmonyqml/components/Base/HScalingBox.qml b/harmonyqml/components/Base/HScalingBox.qml index cb4f02bc..f1eb3b9a 100644 --- a/harmonyqml/components/Base/HScalingBox.qml +++ b/harmonyqml/components/Base/HScalingBox.qml @@ -1,6 +1,6 @@ import QtQuick 2.7 -HGlassRectangle { +HRectangle { property real widthForHeight: 0.75 property int baseHeight: 300 property int startScalingUpAboveHeight: 1080 diff --git a/harmonyqml/components/Base/HStyle.qml b/harmonyqml/components/Base/HStyle.qml index 8980a55c..3eba3a25 100644 --- a/harmonyqml/components/Base/HStyle.qml +++ b/harmonyqml/components/Base/HStyle.qml @@ -57,6 +57,10 @@ QtObject { } readonly property QtObject chat: QtObject { + readonly property QtObject selectViewBar: QtObject { + property color background: colors.background1 + } + readonly property QtObject roomHeader: QtObject { property color background: colors.background1 } diff --git a/harmonyqml/components/Chat/Banners/Banner.qml b/harmonyqml/components/Chat/Banners/Banner.qml index 45dfa71b..b9d54287 100644 --- a/harmonyqml/components/Chat/Banners/Banner.qml +++ b/harmonyqml/components/Chat/Banners/Banner.qml @@ -2,7 +2,7 @@ import QtQuick 2.7 import QtQuick.Layouts 1.3 import "../../Base" -HGlassRectangle { +HRectangle { id: banner Layout.fillWidth: true Layout.preferredHeight: 32 diff --git a/harmonyqml/components/Chat/Chat.qml b/harmonyqml/components/Chat/Chat.qml index 47b47e8b..da70b10b 100644 --- a/harmonyqml/components/Chat/Chat.qml +++ b/harmonyqml/components/Chat/Chat.qml @@ -3,8 +3,9 @@ import QtQuick.Layouts 1.3 import "../Base" import "Banners" import "RoomEventList" +import "DetailsPane" -HColumnLayout { +HSplitView { property string userId: "" property string category: "" property string roomId: "" @@ -31,34 +32,46 @@ HColumnLayout { } ) - RoomHeader { - displayName: roomInfo.displayName - topic: roomInfo.topic || "" - } - - RoomEventList { + HColumnLayout { Layout.fillWidth: true - Layout.fillHeight: true + + RoomHeader { + displayName: roomInfo.displayName + topic: roomInfo.topic || "" + } + + RoomEventList { + Layout.fillWidth: true + Layout.fillHeight: true + } + + TypingMembersBar {} + + InviteBanner { + visible: category === "Invites" + inviter: roomInfo.inviter + } + + UnknownDevicesBanner { + visible: category == "Rooms" && hasUnknownDevices + } + + SendBox { + id: sendBox + visible: category == "Rooms" && ! hasUnknownDevices + } + + LeftBanner { + visible: category === "Left" + leftEvent: roomInfo.leftEvent + } } - TypingMembersBar {} + DetailsPane { + property int parentWidth: parent.width + onParentWidthChanged: width = Math.min(parent.width * 0.3, 300) - InviteBanner { - visible: category === "Invites" - inviter: roomInfo.inviter - } - - UnknownDevicesBanner { - visible: category == "Rooms" && hasUnknownDevices - } - - SendBox { - id: sendBox - visible: category == "Rooms" && ! hasUnknownDevices - } - - LeftBanner { - visible: category === "Left" - leftEvent: roomInfo.leftEvent + Layout.minimumWidth: 36 + Layout.maximumWidth: parent.width } } diff --git a/harmonyqml/components/Chat/RoomEventList/RoomEventList.qml b/harmonyqml/components/Chat/RoomEventList/RoomEventList.qml index 5cfe501e..ec0e41ec 100644 --- a/harmonyqml/components/Chat/RoomEventList/RoomEventList.qml +++ b/harmonyqml/components/Chat/RoomEventList/RoomEventList.qml @@ -1,7 +1,7 @@ import QtQuick 2.7 import "../../Base" -HGlassRectangle { +HRectangle { property int space: 8 color: HStyle.chat.roomEventList.background diff --git a/harmonyqml/components/Chat/RoomHeader.qml b/harmonyqml/components/Chat/RoomHeader.qml index 98f04c3b..a9062dd4 100644 --- a/harmonyqml/components/Chat/RoomHeader.qml +++ b/harmonyqml/components/Chat/RoomHeader.qml @@ -2,7 +2,7 @@ import QtQuick 2.7 import QtQuick.Layouts 1.3 import "../Base" -HGlassRectangle { +HRectangle { property string displayName: "" property string topic: "" diff --git a/harmonyqml/components/Chat/SendBox.qml b/harmonyqml/components/Chat/SendBox.qml index a4dd43d1..2ca93dce 100644 --- a/harmonyqml/components/Chat/SendBox.qml +++ b/harmonyqml/components/Chat/SendBox.qml @@ -2,7 +2,7 @@ import QtQuick 2.7 import QtQuick.Layouts 1.3 import "../Base" -HGlassRectangle { +HRectangle { function setFocus() { textArea.forceActiveFocus() } id: root diff --git a/harmonyqml/components/Chat/TypingMembersBar.qml b/harmonyqml/components/Chat/TypingMembersBar.qml index b43698dd..0283d4e4 100644 --- a/harmonyqml/components/Chat/TypingMembersBar.qml +++ b/harmonyqml/components/Chat/TypingMembersBar.qml @@ -3,7 +3,7 @@ import QtQuick.Layouts 1.3 import "../Base" import "utils.js" as ChatJS -HGlassRectangle { +HRectangle { property var typingMembers: chatPage.roomInfo.typingMembers color: HStyle.chat.typingMembers.background diff --git a/harmonyqml/components/SidePane/SidePane.qml b/harmonyqml/components/SidePane/SidePane.qml index 1bdef9a3..221a3d31 100644 --- a/harmonyqml/components/SidePane/SidePane.qml +++ b/harmonyqml/components/SidePane/SidePane.qml @@ -1,10 +1,8 @@ import QtQuick.Layouts 1.3 -import QtGraphicalEffects 1.0 import "../Base" -HGlassRectangle { +HRectangle { id: sidePane - isPageStackDescendant: false HColumnLayout { anchors.fill: parent diff --git a/harmonyqml/components/UI.qml b/harmonyqml/components/UI.qml index 4691735d..7bd59ac2 100644 --- a/harmonyqml/components/UI.qml +++ b/harmonyqml/components/UI.qml @@ -50,7 +50,8 @@ Item { Component.onCompleted: { if (pageStack.initialPageSet) { return } pageStack.initialPageSet = true - showPage(accountsLoggedIn ? "Default" : "SignIn") + showRoom("@test_mary:matrix.org", "Rooms", "!TSXGsbBbdwsdylIOJZ:matrix.org") + //showPage(accountsLoggedIn ? "Default" : "SignIn") } onCurrentItemChanged: if (currentItem) {