mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 03:50:40 +02:00
Merge pull request #14298 from ctrlaltdavid/M17640
Fix Goto app cards staying highlighted if move off dialog while dragging
This commit is contained in:
commit
4ac719a87f
2 changed files with 15 additions and 5 deletions
|
@ -49,6 +49,7 @@ Item {
|
||||||
property string defaultThumbnail: Qt.resolvedUrl("../../images/default-domain.gif");
|
property string defaultThumbnail: Qt.resolvedUrl("../../images/default-domain.gif");
|
||||||
property int shadowHeight: 10;
|
property int shadowHeight: 10;
|
||||||
property bool hovered: false
|
property bool hovered: false
|
||||||
|
property bool scrolling: false
|
||||||
|
|
||||||
HifiConstants { id: hifi }
|
HifiConstants { id: hifi }
|
||||||
|
|
||||||
|
@ -236,11 +237,12 @@ Item {
|
||||||
property var hoverThunk: function () { };
|
property var hoverThunk: function () { };
|
||||||
property var unhoverThunk: function () { };
|
property var unhoverThunk: function () { };
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.fill: parent;
|
anchors.fill: parent
|
||||||
visible: root.hovered
|
visible: root.hovered && !root.scrolling
|
||||||
color: "transparent";
|
color: "transparent"
|
||||||
border.width: 4; border.color: hifiStyleConstants.colors.primaryHighlight;
|
border.width: 4
|
||||||
z: 1;
|
border.color: hifiStyleConstants.colors.primaryHighlight
|
||||||
|
z: 1
|
||||||
}
|
}
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent;
|
anchors.fill: parent;
|
||||||
|
@ -255,6 +257,12 @@ Item {
|
||||||
hoverThunk();
|
hoverThunk();
|
||||||
}
|
}
|
||||||
onExited: unhoverThunk();
|
onExited: unhoverThunk();
|
||||||
|
onCanceled: unhoverThunk();
|
||||||
|
}
|
||||||
|
MouseArea {
|
||||||
|
// This second mouse area causes onEntered to fire on the first if you scroll just a little and the cursor stays on
|
||||||
|
// the original card. I.e., the original card is re-highlighted if the cursor is on it after scrolling finishes.
|
||||||
|
anchors.fill: parent
|
||||||
}
|
}
|
||||||
StateImage {
|
StateImage {
|
||||||
id: actionIcon;
|
id: actionIcon;
|
||||||
|
|
|
@ -141,6 +141,8 @@ Column {
|
||||||
textSizeSmall: root.textSizeSmall;
|
textSizeSmall: root.textSizeSmall;
|
||||||
stackShadowNarrowing: root.stackShadowNarrowing;
|
stackShadowNarrowing: root.stackShadowNarrowing;
|
||||||
shadowHeight: root.stackedCardShadowHeight;
|
shadowHeight: root.stackedCardShadowHeight;
|
||||||
|
scrolling: scroll.moving
|
||||||
|
|
||||||
hoverThunk: function () {
|
hoverThunk: function () {
|
||||||
hovered = true;
|
hovered = true;
|
||||||
if(root.autoScrollTimerEnabled) {
|
if(root.autoScrollTimerEnabled) {
|
||||||
|
|
Loading…
Reference in a new issue