fix(@desktop/chat) Acitvity tooltip arrow should be in center when members list is shown
fixes #3102
This commit is contained in:
parent
90aa9d76c0
commit
5248322ec1
|
@ -17,6 +17,8 @@ Rectangle {
|
||||||
property alias membersButton: membersButton
|
property alias membersButton: membersButton
|
||||||
property alias searchButton: searchButton
|
property alias searchButton: searchButton
|
||||||
property int notificationCount: 0
|
property int notificationCount: 0
|
||||||
|
// Used to understand if the tooltip is in the corner of the screen
|
||||||
|
property bool isCorner: true
|
||||||
|
|
||||||
property Component popupMenu
|
property Component popupMenu
|
||||||
|
|
||||||
|
@ -166,7 +168,7 @@ Rectangle {
|
||||||
text: "Activity"
|
text: "Activity"
|
||||||
orientation: StatusToolTip.Orientation.Bottom
|
orientation: StatusToolTip.Orientation.Bottom
|
||||||
y: parent.height + 12
|
y: parent.height + 12
|
||||||
arrow.x: width - (parent.width-4)
|
cornerToolTip: isCorner
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@ ToolTip {
|
||||||
Right
|
Right
|
||||||
}
|
}
|
||||||
|
|
||||||
|
property bool cornerToolTip: false
|
||||||
property int maxWidth: 800
|
property int maxWidth: 800
|
||||||
property int orientation: StatusToolTip.Orientation.Top
|
property int orientation: StatusToolTip.Orientation.Top
|
||||||
property alias arrow: arrow
|
property alias arrow: arrow
|
||||||
|
@ -41,7 +42,7 @@ ToolTip {
|
||||||
radius: 1
|
radius: 1
|
||||||
x: {
|
x: {
|
||||||
if (orientation === StatusToolTip.Orientation.Top || orientation === StatusToolTip.Orientation.Bottom) {
|
if (orientation === StatusToolTip.Orientation.Top || orientation === StatusToolTip.Orientation.Bottom) {
|
||||||
return statusToolTipBackground.width / 2 - width / 2
|
return cornerToolTip ? (statusToolTip.x + statusToolTip.width) : (statusToolTipBackground.width / 2 - arrow.width / 2)
|
||||||
}
|
}
|
||||||
if (orientation === StatusToolTip.Orientation.Left) {
|
if (orientation === StatusToolTip.Orientation.Left) {
|
||||||
return statusToolTipContentBackground.width - (width / 2) - 8
|
return statusToolTipContentBackground.width - (width / 2) - 8
|
||||||
|
|
Loading…
Reference in New Issue