mirror of
https://github.com/lubosz/overte.git
synced 2025-04-19 12:24:01 +02:00
Fix Goto app clicks not working
Includes better card highlighting fix.
This commit is contained in:
parent
7ffba9d987
commit
010f7121a3
2 changed files with 11 additions and 13 deletions
|
@ -49,7 +49,6 @@ Item {
|
|||
property string defaultThumbnail: Qt.resolvedUrl("../../images/default-domain.gif");
|
||||
property int shadowHeight: 10;
|
||||
property bool hovered: false
|
||||
property bool scrolling: false
|
||||
|
||||
HifiConstants { id: hifi }
|
||||
|
||||
|
@ -238,7 +237,7 @@ Item {
|
|||
property var unhoverThunk: function () { };
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
visible: root.hovered && !root.scrolling
|
||||
visible: root.hovered
|
||||
color: "transparent"
|
||||
border.width: 4
|
||||
border.color: hifiStyleConstants.colors.primaryHighlight
|
||||
|
@ -252,17 +251,17 @@ Item {
|
|||
goFunction("hifi://" + hifiUrl);
|
||||
}
|
||||
hoverEnabled: true;
|
||||
onEntered: {
|
||||
Tablet.playSound(TabletEnums.ButtonHover);
|
||||
hoverThunk();
|
||||
onContainsMouseChanged: {
|
||||
// Use onContainsMouseChanged rather than onEntered and onExited because the latter aren't always
|
||||
// triggered correctly - e.g., if drag rightwards from right hand side of a card to the next card
|
||||
// onExited doesn't fire, in which case can end up with two cards highlighted.
|
||||
if (containsMouse) {
|
||||
Tablet.playSound(TabletEnums.ButtonHover);
|
||||
hoverThunk();
|
||||
} else {
|
||||
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 {
|
||||
id: actionIcon;
|
||||
|
|
|
@ -141,7 +141,6 @@ Column {
|
|||
textSizeSmall: root.textSizeSmall;
|
||||
stackShadowNarrowing: root.stackShadowNarrowing;
|
||||
shadowHeight: root.stackedCardShadowHeight;
|
||||
scrolling: scroll.moving
|
||||
|
||||
hoverThunk: function () {
|
||||
hovered = true;
|
||||
|
|
Loading…
Reference in a new issue