fix: reactions distance to message content is inconsistent

- harmonize the margins/spacings in other message components
- fix warnings
- cleanup/remove some dead code

Fixes #8295
This commit is contained in:
Lukáš Tinkl 2022-11-22 19:01:07 +01:00 committed by Lukáš Tinkl
parent 7ab06c6060
commit 2bf2861631
4 changed files with 4 additions and 16 deletions

View File

@ -389,7 +389,6 @@ Control {
id: emojiReactionsPanel id: emojiReactionsPanel
emojiReactionsModel: root.reactionsModel emojiReactionsModel: root.reactionsModel
store: root.messageStore
icons: root.reactionIcons icons: root.reactionIcons
onHoverChanged: { onHoverChanged: {

View File

@ -20,7 +20,6 @@ Item {
signal hoverChanged(bool hovered) signal hoverChanged(bool hovered)
signal toggleReaction(int emojiID) signal toggleReaction(int emojiID)
property var store
property bool isCurrentUser property bool isCurrentUser
property var emojiReactionsModel property var emojiReactionsModel

View File

@ -57,16 +57,12 @@ Item {
Connections { Connections {
target: root.store.communitiesModuleInst target: root.store.communitiesModuleInst
onCommunityChanged: function (communityId) { function onCommunityChanged(communityId) {
if (communityId === root.communityId) { if (communityId === root.communityId) {
d.reevaluate() d.reevaluate()
} }
} }
} function onCommunityAdded(communityId) {
Connections {
target: root.store.communitiesModuleInst
onCommunityAdded: function (communityId) {
if (communityId === root.communityId) { if (communityId === root.communityId) {
d.reevaluate() d.reevaluate()
} }
@ -136,7 +132,6 @@ Item {
// } // }
} }
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
font.pixelSize: 15
} }
} }
@ -190,7 +185,6 @@ Item {
text: d.invitedCommunity.description text: d.invitedCommunity.description
wrapMode: Text.WrapAtWordBoundaryOrAnywhere wrapMode: Text.WrapAtWordBoundaryOrAnywhere
font.pixelSize: 15
color: Theme.palette.directColor1 color: Theme.palette.directColor1
} }

View File

@ -28,8 +28,7 @@ Column {
signal imageClicked(var image) signal imageClicked(var image)
spacing: Style.current.halfPadding spacing: 4
height: childrenRect.height
QtObject { QtObject {
id: d id: d
@ -275,7 +274,6 @@ Column {
isCurrentUser: root.isCurrentUser isCurrentUser: root.isCurrentUser
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top anchors.top: parent.top
anchors.topMargin: 1
playing: root.messageStore.playAnimation playing: root.messageStore.playAnimation
isOnline: root.store.mainModuleInst.isOnline isOnline: root.store.mainModuleInst.isOnline
} }
@ -292,7 +290,6 @@ Column {
anchors.right: parent.right anchors.right: parent.right
anchors.leftMargin: Style.current.smallPadding anchors.leftMargin: Style.current.smallPadding
anchors.rightMargin: Style.current.smallPadding anchors.rightMargin: Style.current.smallPadding
color: Theme.palette.directColor1
} }
StatusBaseText { StatusBaseText {
@ -304,7 +301,7 @@ Column {
anchors.top: linkTitle.bottom anchors.top: linkTitle.bottom
anchors.topMargin: 2 anchors.topMargin: 2
anchors.left: linkTitle.left anchors.left: linkTitle.left
anchors.bottomMargin: Style.current.smallPadding anchors.bottomMargin: Style.current.halfPadding
} }
MouseArea { MouseArea {
@ -370,7 +367,6 @@ Column {
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
anchors.top: unfurlingImage.bottom anchors.top: unfurlingImage.bottom
anchors.topMargin: Style.current.halfPadding anchors.topMargin: Style.current.halfPadding
font.pixelSize: 15
color: Theme.palette.directColor1 color: Theme.palette.directColor1
} }