From 104e194cfb5e6e90310bdd318cedb2b4802f7c08 Mon Sep 17 00:00:00 2001 From: Black Hat Date: Mon, 3 Sep 2018 07:13:39 +0800 Subject: [PATCH] Change some color. --- qml/Room.qml | 8 +++++++- qml/Setting.qml | 20 +++++++++----------- qml/form/RoomForm.qml | 5 +++-- qml/form/RoomListForm.qml | 16 ++++++++++++++-- 4 files changed, 33 insertions(+), 16 deletions(-) diff --git a/qml/Room.qml b/qml/Room.qml index 702f69e..ed1f17b 100644 --- a/qml/Room.qml +++ b/qml/Room.qml @@ -21,7 +21,7 @@ Page { Rectangle { anchors.fill: parent - color: MSettings.darkTheme ? "#363636" : "#f3f3f3" + color: MSettings.darkTheme ? "#323232" : "#f3f3f3" RowLayout { anchors.fill: parent @@ -39,6 +39,12 @@ Page { listModel: roomListModel } + Rectangle { + Layout.preferredWidth: 1 + Layout.fillHeight: true + color: MSettings.darkTheme ? "#363636" : "#ececec" + } + RoomForm { id: roomForm diff --git a/qml/Setting.qml b/qml/Setting.qml index 1b739f4..968ee5b 100644 --- a/qml/Setting.qml +++ b/qml/Setting.qml @@ -65,32 +65,24 @@ Page { checked: MSettings.lazyLoad onCheckedChanged: MSettings.lazyLoad = checked } + Switch { text: "Force loading message delegates asynchronously" checked: MSettings.asyncMessageDelegate onCheckedChanged: MSettings.asyncMessageDelegate = checked } + Switch { text: "Use RichText instead of StyledText" checked: MSettings.richText onCheckedChanged: MSettings.richText = checked } + Switch { text: "Use press and hold instead of right click" checked: MSettings.pressAndHold onCheckedChanged: MSettings.pressAndHold = checked } - Switch { - text: "Rearrange rooms by activity" - checked: MSettings.rearrangeByActivity - onCheckedChanged: MSettings.rearrangeByActivity = checked - } - - Button { - text: "Invoke GC" - highlighted: true - onClicked: gc() - } } } @@ -109,6 +101,12 @@ Page { checked: MSettings.miniMode onCheckedChanged: MSettings.miniMode = checked } + + Switch { + text: "Rearrange rooms by activity" + checked: MSettings.rearrangeByActivity + onCheckedChanged: MSettings.rearrangeByActivity = checked + } } } diff --git a/qml/form/RoomForm.qml b/qml/form/RoomForm.qml index 92a00c7..c94ec12 100644 --- a/qml/form/RoomForm.qml +++ b/qml/form/RoomForm.qml @@ -226,6 +226,7 @@ Item { Layout.fillWidth: true Layout.fillHeight: true + clip: true displayMarginBeginning: 40 displayMarginEnd: 40 verticalLayoutDirection: ListView.BottomToTop @@ -379,7 +380,7 @@ Item { } background: Rectangle { - color: MSettings.darkTheme ? "#242424" : "#eaeaea" + color: MSettings.darkTheme ? "#282828" : "#eaeaea" } ToolTip.visible: currentRoom && currentRoom.hasUsersTyping @@ -462,7 +463,7 @@ Item { contentItem: MaterialIcon { icon: "\ue24e" } - background: Rectangle { color: MSettings.darkTheme ? "#242424" : "#eaeaea" } + background: Rectangle { color: MSettings.darkTheme ? "#282828" : "#eaeaea" } onClicked: emojiPicker.visible ? emojiPicker.close() : emojiPicker.open() diff --git a/qml/form/RoomListForm.qml b/qml/form/RoomListForm.qml index f9943b5..1b0aad7 100644 --- a/qml/form/RoomListForm.qml +++ b/qml/form/RoomListForm.qml @@ -36,7 +36,7 @@ Item { placeholderText: "Search..." background: Rectangle { - color: MSettings.darkTheme ? "#242424" : "#fafafa" + color: MSettings.darkTheme ? "#282828" : "#fafafa" } Shortcut { @@ -89,6 +89,11 @@ Item { currentIndex: -1 + highlightFollowsCurrentItem: true + + highlightMoveDuration: 200 + highlightResizeDuration: 0 + boundsBehavior: Flickable.DragOverBounds ScrollBar.vertical: ScrollBar {} @@ -99,7 +104,7 @@ Item { width: parent.width height: 64 - color: "#fafafa" + color: MSettings.darkTheme ? "#282828" : "#fafafa" AutoMouseArea { anchors.fill: parent @@ -113,6 +118,13 @@ Item { ToolTip.text: name } + Rectangle { + anchors.fill: parent + visible: highlighted + color: Material.accent + opacity: 0.1 + } + Rectangle { width: 4 height: parent.height