Skip to content

Commit b8593e8

Browse files
committed
fix(StatusMessage): maek the emoji reactions buttons bigger
- and rework the context menu to ContextMenu + TapHandler - use edge-to-edge separators in the profile context menu
1 parent 3f4f824 commit b8593e8

File tree

6 files changed

+18
-17
lines changed

6 files changed

+18
-17
lines changed

ui/StatusQ/src/StatusQ/Components/StatusMessage.qml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ Control {
4545
property var statusChatInput
4646
property alias linksComponent: linksLoader.sourceComponent
4747
property alias invitationComponent: invitationBubbleLoader.sourceComponent
48-
property alias mouseArea: mouseArea
4948

5049
property string pinnedMsgInfoText: ""
5150

@@ -192,11 +191,6 @@ Control {
192191
implicitWidth: messageLayout.implicitWidth
193192
implicitHeight: messageLayout.implicitHeight
194193

195-
StatusMouseArea {
196-
id: mouseArea
197-
anchors.fill: parent
198-
}
199-
200194
ColumnLayout {
201195
id: messageLayout
202196
anchors.fill: parent

ui/StatusQ/src/StatusQ/Components/private/statusMessage/StatusMessageEmojiReactions.qml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,14 @@ Flow {
4646
Repeater {
4747
model: root.reactionsModel
4848

49-
Button {
49+
StatusButton {
5050
id: reactionDelegate
5151

52-
verticalPadding: Theme.halfPadding
53-
leftPadding: Theme.halfPadding
54-
rightPadding: Theme.halfPadding / 2
52+
size: StatusBaseButton.Size.Small
53+
implicitHeight: 32
54+
55+
verticalPadding: Theme.halfPadding / 2
56+
horizontalPadding: Theme.halfPadding
5557
spacing: Theme.halfPadding / 2
5658

5759
background: Rectangle {

ui/StatusQ/src/StatusQ/Popups/StatusMenuItem.qml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import QtQuick
22
import QtQuick.Controls
3+
import QtQuick.Controls.Universal
34
import QtQuick.Layouts
45

56
import StatusQ.Core

ui/imports/shared/controls/chat/EmojiReaction.qml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ Rectangle {
2626
StatusEmoji {
2727
id: statusEmoji
2828
anchors.centerIn: parent
29-
width: Theme.fontSize24
30-
height: Theme.fontSize24
29+
width: Theme.fontSize22
30+
height: Theme.fontSize22
3131
emojiId: root.emojiId
3232
}
3333

ui/imports/shared/views/chat/MessageView.qml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import QtQuick
2+
import QtQuick.Controls
23
import QtQuick.Window
34
import QtQuick.Layouts
45
import QtModelsToolkit
@@ -219,7 +220,7 @@ Loader {
219220
profileContextMenuComponent.createObject(root, params).popup(x, y)
220221
}
221222

222-
function openMessageContextMenu(x, y) {
223+
function openMessageContextMenu(pos) {
223224
if (isViewMemberMessagesePopup || placeholderMessage || !root.joined)
224225
return
225226

@@ -241,7 +242,7 @@ Loader {
241242
editRestricted: root.editRestricted,
242243
}
243244

244-
messageContextMenuComponent.createObject(root, params).popup(x, y)
245+
messageContextMenuComponent.createObject(root, params).popup(pos)
245246
}
246247

247248
function setMessageActive(messageId, active) {
@@ -878,9 +879,10 @@ Loader {
878879
root.messageStore.resendMessage(root.messageId)
879880
}
880881

881-
mouseArea {
882-
acceptedButtons: Qt.RightButton
883-
onClicked: mouse => root.openMessageContextMenu(mouse.x, mouse.y)
882+
ContextMenu.onRequested: pos => root.openMessageContextMenu(pos)
883+
TapHandler {
884+
acceptedDevices: PointerDevice.TouchScreen
885+
onLongPressed: root.openMessageContextMenu(point.pressPosition)
884886
}
885887

886888
messageDetails: StatusMessageDetails {

ui/imports/shared/views/chat/ProfileContextMenu.qml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ StatusMenu {
6666
StatusMenuSeparator {
6767
visible: root.profileType !== Constants.profileType.bridged
6868
topPadding: root.topPadding
69+
horizontalPadding: 0
6970
}
7071

7172
ViewProfileMenuItem {
@@ -129,6 +130,7 @@ StatusMenu {
129130
topPadding: root.topPadding
130131
visible: root.profileType !== Constants.profileType.bridged &&
131132
(removeNicknameAction.enabled || unblockAction.enabled || markUntrustworthyMenuItem.enabled || removeUntrustworthyMarkMenuItem.enabled || removeContactAction.enabled || blockMenuItem.enabled)
133+
horizontalPadding: 0
132134
}
133135

134136
// Remove Nickname

0 commit comments

Comments
 (0)