summary refs log tree commit diff
path: root/resources
diff options
context:
space:
mode:
authorJoseph Donofry <joedonofry@gmail.com>2020-05-07 20:53:24 -0400
committerJoseph Donofry <joedonofry@gmail.com>2020-05-07 20:53:24 -0400
commita1661f7006d7661bfd54cdd9971afd6717ed9c92 (patch)
tree8d8a221740487d0411795a17918715e15e89cf99 /resources
parentMerge pull request #192 from Nheko-Reborn/reactions (diff)
downloadnheko-a1661f7006d7661bfd54cdd9971afd6717ed9c92.tar.xz
merge master into reactions
Diffstat (limited to 'resources')
-rw-r--r--resources/qml/ImageButton.qml3
-rw-r--r--resources/qml/TimelineRow.qml13
-rw-r--r--resources/qml/TimelineView.qml5
-rw-r--r--resources/qml/delegates/Pill.qml5
4 files changed, 22 insertions, 4 deletions
diff --git a/resources/qml/ImageButton.qml b/resources/qml/ImageButton.qml
index dd100503..dd67d597 100644
--- a/resources/qml/ImageButton.qml
+++ b/resources/qml/ImageButton.qml
@@ -3,7 +3,8 @@ import QtQuick.Controls 2.3
 
 AbstractButton {
 	property string image: undefined
-
+	width: 16
+	height: 16
 	id: button
 
 	Image {
diff --git a/resources/qml/TimelineRow.qml b/resources/qml/TimelineRow.qml
index 22222ef3..de71fb69 100644
--- a/resources/qml/TimelineRow.qml
+++ b/resources/qml/TimelineRow.qml
@@ -71,7 +71,18 @@ MouseArea {
 			Layout.preferredHeight: 16
 			width: 16
 		}
-
+		ImageButton {
+			visible: timelineSettings.buttons
+			Layout.alignment: Qt.AlignRight | Qt.AlignTop
+			Layout.preferredHeight: 16
+			width: 16
+			id: reactButton
+			hoverEnabled: true
+			image: ":/icons/icons/ui/smile.png"
+			ToolTip.visible: hovered
+			ToolTip.text: qsTr("React")
+			onClicked: chat.model.reactAction(model.id)
+		}
 		ImageButton {
 			visible: timelineSettings.buttons
 			Layout.alignment: Qt.AlignRight | Qt.AlignTop
diff --git a/resources/qml/TimelineView.qml b/resources/qml/TimelineView.qml
index eca646d1..9a360726 100644
--- a/resources/qml/TimelineView.qml
+++ b/resources/qml/TimelineView.qml
@@ -48,7 +48,10 @@ Page {
 		property string eventId
 		property int eventType
 		property bool isEncrypted
-
+		MenuItem {
+			text: qsTr("React")
+			onClicked: chat.model.reactAction(messageContextMenu.eventId)
+		}
 		MenuItem {
 			text: qsTr("Reply")
 			onClicked: chat.model.replyAction(messageContextMenu.eventId)
diff --git a/resources/qml/delegates/Pill.qml b/resources/qml/delegates/Pill.qml
index c4260c33..23a69b10 100644
--- a/resources/qml/delegates/Pill.qml
+++ b/resources/qml/delegates/Pill.qml
@@ -2,6 +2,9 @@ import QtQuick 2.5
 import QtQuick.Controls 2.1
 
 Label {
+	id: pillComponent
+	property color userColor: "red"
+
 	color: colors.brightText
 	horizontalAlignment: Text.AlignHCenter
 
@@ -10,6 +13,6 @@ Label {
 
 	background: Rectangle {
 		radius: parent.height / 2
-		color: colors.dark
+		color: Qt.rgba(userColor.r, userColor.g, userColor.b, 0.2)
 	}
 }