{"action":"created","comment":{"url":"https://api.github.com/repos/mavlink/qgroundcontrol/pulls/comments/25991182","id":25991182,"diff_hunk":"@@ -11,32 +12,50 @@ Button {\n \n     property var __qgcPal: QGCPalette { colorGroupEnabled: enabled }\n \n-    property bool __showHighlight: pressed | hovered | checked\n+    property bool __showHighlight: (pressed | hovered | checked) && !__forceHoverOff\n \n-    style: ButtonStyle {\n-/*\n-            background: Rectangle {\n-                implicitWidth: 100\n-                implicitHeight: 25\n-                color: __showHighlight ?\n-                    control.__qgcPal.buttonHighlight :\n-                    (primary ? control.__qgcPal.primaryButton : control.__qgcPal.button)\n-            }\n+    // This fixes the issue with button hover where if a Button is near the edge oa QQuickWidget you can\n+    // move the mouse fast enough such that the MouseArea does not trigger an onExited. This is turn\n+    // cause the hover property to not be cleared correctly.\n \n-            label: Text {\n-                width: parent.width\n-                height: parent.height\n+    property bool __forceHoverOff: false\n \n-                verticalAlignment: TextEdit.AlignVCenter\n-                horizontalAlignment: TextEdit.AlignHCenter\n+    property int __lastMouseX:  __behavior.mouseX\n+    property int __lastMouseY:  __behavior.mouseY\n+    property int __lastCursorX: 0\n+    property int __lastCursorY: 0\n \n-                text: control.text\n-                color: __showHighlight ?\n-                    control.__qgcPal.buttonHighlightText :\n-                    (primary ? control.__qgcPal.primaryButtonText : control.__qgcPal.buttonText)\n+    property MousePosition __mousePosition: MousePosition { }\n+\n+    Connections {\n+        target: __behavior\n+        onMouseXChanged: {\n+            __lastCursorX = __mousePosition.mouseX\n+            __lastCursorY = __mousePosition.mouseY\n+        }\n+        onMouseYChanged: {\n+            __lastCursorX = __mousePosition.mouseX\n+            __lastCursorY = __mousePosition.mouseY\n+        }\n+        onEntered: { __forceHoverOff; false; hoverTimer.start() }\n+        onExited: { __forceHoverOff; false; hoverTimer.stop() }\n+    }\n+\n+    Timer {\n+        id:         hoverTimer\n+        interval:   250\n+        repeat:     true\n+\n+        onTriggered: {\n+            if (__lastCursorX != __mousePosition.mouseX || __lastCursorY != __mousePosition.mouseY) {\n+                __forceHoverOff = true\n+            } else {\n+                __forceHoverOff = false\n             }","path":"src/QmlControls/QGCButton.qml","position":70,"original_position":70,"commit_id":"9f4b6e76f5014a72a1e8e7a0d023664af461272c","original_commit_id":"9f4b6e76f5014a72a1e8e7a0d023664af461272c","user":{"login":"dogmaphobic","id":749243,"avatar_url":"https://avatars.githubusercontent.com/u/749243?v=3","gravatar_id":"","url":"https://api.github.com/users/dogmaphobic","html_url":"https://github.com/dogmaphobic","followers_url":"https://api.github.com/users/dogmaphobic/followers","following_url":"https://api.github.com/users/dogmaphobic/following{/other_user}","gists_url":"https://api.github.com/users/dogmaphobic/gists{/gist_id}","starred_url":"https://api.github.com/users/dogmaphobic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dogmaphobic/subscriptions","organizations_url":"https://api.github.com/users/dogmaphobic/orgs","repos_url":"https://api.github.com/users/dogmaphobic/repos","events_url":"https://api.github.com/users/dogmaphobic/events{/privacy}","received_events_url":"https://api.github.com/users/dogmaphobic/received_events","type":"User","site_admin":false},"body":"Didn't I mention this wasn't simple? :)","created_at":"2015-03-07T01:28:39Z","updated_at":"2015-03-07T01:28:39Z","html_url":"https://github.com/mavlink/qgroundcontrol/pull/1333#discussion_r25991182","pull_request_url":"https://api.github.com/repos/mavlink/qgroundcontrol/pulls/1333","_links":{"self":{"href":"https://api.github.com/repos/mavlink/qgroundcontrol/pulls/comments/25991182"},"html":{"href":"https://github.com/mavlink/qgroundcontrol/pull/1333#discussion_r25991182"},"pull_request":{"href":"https://api.github.com/repos/mavlink/qgroundcontrol/pulls/1333"}}},"pull_request":{"url":"https://api.github.com/repos/mavlink/qgroundcontrol/pulls/1333","id":30690201,"html_url":"https://github.com/mavlink/qgroundcontrol/pull/1333","diff_url":"https://github.com/mavlink/qgroundcontrol/pull/1333.diff","patch_url":"https://github.com/mavlink/qgroundcontrol/pull/1333.patch","issue_url":"https://api.github.com/repos/mavlink/qgroundcontrol/issues/1333","number":1333,"state":"open","locked":false,"title":"Fix hover state of Button","user":{"login":"DonLakeFlyer","id":5876851,"avatar_url":"https://avatars.githubusercontent.com/u/5876851?v=3","gravatar_id":"","url":"https://api.github.com/users/DonLakeFlyer","html_url":"https://github.com/DonLakeFlyer","followers_url":"https://api.github.com/users/DonLakeFlyer/followers","following_url":"https://api.github.com/users/DonLakeFlyer/following{/other_user}","gists_url":"https://api.github.com/users/DonLakeFlyer/gists{/gist_id}","starred_url":"https://api.github.com/users/DonLakeFlyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DonLakeFlyer/subscriptions","organizations_url":"https://api.github.com/users/DonLakeFlyer/orgs","repos_url":"https://api.github.com/users/DonLakeFlyer/repos","events_url":"https://api.github.com/users/DonLakeFlyer/events{/privacy}","received_events_url":"https://api.github.com/users/DonLakeFlyer/received_events","type":"User","site_admin":false},"body":"Fixes Issue #1270 ","created_at":"2015-03-06T23:48:55Z","updated_at":"2015-03-07T01:28:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"839a2e2f6a60d089359d1ca2eb2486a98b8986ef","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mavlink/qgroundcontrol/pulls/1333/commits","review_comments_url":"https://api.github.com/repos/mavlink/qgroundcontrol/pulls/1333/comments","review_comment_url":"https://api.github.com/repos/mavlink/qgroundcontrol/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mavlink/qgroundcontrol/issues/1333/comments","statuses_url":"https://api.github.com/repos/mavlink/qgroundcontrol/statuses/9f4b6e76f5014a72a1e8e7a0d023664af461272c","head":{"label":"DonLakeFlyer:Hover","ref":"Hover","sha":"9f4b6e76f5014a72a1e8e7a0d023664af461272c","user":{"login":"DonLakeFlyer","id":5876851,"avatar_url":"https://avatars.githubusercontent.com/u/5876851?v=3","gravatar_id":"","url":"https://api.github.com/users/DonLakeFlyer","html_url":"https://github.com/DonLakeFlyer","followers_url":"https://api.github.com/users/DonLakeFlyer/followers","following_url":"https://api.github.com/users/DonLakeFlyer/following{/other_user}","gists_url":"https://api.github.com/users/DonLakeFlyer/gists{/gist_id}","starred_url":"https://api.github.com/users/DonLakeFlyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DonLakeFlyer/subscriptions","organizations_url":"https://api.github.com/users/DonLakeFlyer/orgs","repos_url":"https://api.github.com/users/DonLakeFlyer/repos","events_url":"https://api.github.com/users/DonLakeFlyer/events{/privacy}","received_events_url":"https://api.github.com/users/DonLakeFlyer/received_events","type":"User","site_admin":false},"repo":{"id":14323257,"name":"qgroundcontrol","full_name":"DonLakeFlyer/qgroundcontrol","owner":{"login":"DonLakeFlyer","id":5876851,"avatar_url":"https://avatars.githubusercontent.com/u/5876851?v=3","gravatar_id":"","url":"https://api.github.com/users/DonLakeFlyer","html_url":"https://github.com/DonLakeFlyer","followers_url":"https://api.github.com/users/DonLakeFlyer/followers","following_url":"https://api.github.com/users/DonLakeFlyer/following{/other_user}","gists_url":"https://api.github.com/users/DonLakeFlyer/gists{/gist_id}","starred_url":"https://api.github.com/users/DonLakeFlyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DonLakeFlyer/subscriptions","organizations_url":"https://api.github.com/users/DonLakeFlyer/orgs","repos_url":"https://api.github.com/users/DonLakeFlyer/repos","events_url":"https://api.github.com/users/DonLakeFlyer/events{/privacy}","received_events_url":"https://api.github.com/users/DonLakeFlyer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DonLakeFlyer/qgroundcontrol","description":"QGroundControl Ground Control Station","fork":true,"url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol","forks_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/forks","keys_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/teams","hooks_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/hooks","issue_events_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/issues/events{/number}","events_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/events","assignees_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/assignees{/user}","branches_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/branches{/branch}","tags_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/tags","blobs_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/git/refs{/sha}","trees_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/statuses/{sha}","languages_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/languages","stargazers_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/stargazers","contributors_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/contributors","subscribers_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/subscribers","subscription_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/subscription","commits_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/commits{/sha}","git_commits_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/git/commits{/sha}","comments_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/comments{/number}","issue_comment_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/issues/comments{/number}","contents_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/contents/{+path}","compare_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/merges","archive_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/downloads","issues_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/issues{/number}","pulls_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/pulls{/number}","milestones_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/milestones{/number}","notifications_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/labels{/name}","releases_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/releases{/id}","created_at":"2013-11-12T05:24:25Z","updated_at":"2015-03-02T17:20:30Z","pushed_at":"2015-03-06T23:48:32Z","git_url":"git://github.com/DonLakeFlyer/qgroundcontrol.git","ssh_url":"git@github.com:DonLakeFlyer/qgroundcontrol.git","clone_url":"https://github.com/DonLakeFlyer/qgroundcontrol.git","svn_url":"https://github.com/DonLakeFlyer/qgroundcontrol","homepage":"http://qgroundcontrol.org","size":151684,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mavlink:master","ref":"master","sha":"4a5da9d6d336f27b7a03959b8789169df2f3e963","user":{"login":"mavlink","id":961247,"avatar_url":"https://avatars.githubusercontent.com/u/961247?v=3","gravatar_id":"","url":"https://api.github.com/users/mavlink","html_url":"https://github.com/mavlink","followers_url":"https://api.github.com/users/mavlink/followers","following_url":"https://api.github.com/users/mavlink/following{/other_user}","gists_url":"https://api.github.com/users/mavlink/gists{/gist_id}","starred_url":"https://api.github.com/users/mavlink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mavlink/subscriptions","organizations_url":"https://api.github.com/users/mavlink/orgs","repos_url":"https://api.github.com/users/mavlink/repos","events_url":"https://api.github.com/users/mavlink/events{/privacy}","received_events_url":"https://api.github.com/users/mavlink/received_events","type":"Organization","site_admin":false},"repo":{"id":2567844,"name":"qgroundcontrol","full_name":"mavlink/qgroundcontrol","owner":{"login":"mavlink","id":961247,"avatar_url":"https://avatars.githubusercontent.com/u/961247?v=3","gravatar_id":"","url":"https://api.github.com/users/mavlink","html_url":"https://github.com/mavlink","followers_url":"https://api.github.com/users/mavlink/followers","following_url":"https://api.github.com/users/mavlink/following{/other_user}","gists_url":"https://api.github.com/users/mavlink/gists{/gist_id}","starred_url":"https://api.github.com/users/mavlink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mavlink/subscriptions","organizations_url":"https://api.github.com/users/mavlink/orgs","repos_url":"https://api.github.com/users/mavlink/repos","events_url":"https://api.github.com/users/mavlink/events{/privacy}","received_events_url":"https://api.github.com/users/mavlink/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mavlink/qgroundcontrol","description":"QGroundControl Ground Control Station","fork":false,"url":"https://api.github.com/repos/mavlink/qgroundcontrol","forks_url":"https://api.github.com/repos/mavlink/qgroundcontrol/forks","keys_url":"https://api.github.com/repos/mavlink/qgroundcontrol/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mavlink/qgroundcontrol/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mavlink/qgroundcontrol/teams","hooks_url":"https://api.github.com/repos/mavlink/qgroundcontrol/hooks","issue_events_url":"https://api.github.com/repos/mavlink/qgroundcontrol/issues/events{/number}","events_url":"https://api.github.com/repos/mavlink/qgroundcontrol/events","assignees_url":"https://api.github.com/repos/mavlink/qgroundcontrol/assignees{/user}","branches_url":"https://api.github.com/repos/mavlink/qgroundcontrol/branches{/branch}","tags_url":"https://api.github.com/repos/mavlink/qgroundcontrol/tags","blobs_url":"https://api.github.com/repos/mavlink/qgroundcontrol/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mavlink/qgroundcontrol/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mavlink/qgroundcontrol/git/refs{/sha}","trees_url":"https://api.github.com/repos/mavlink/qgroundcontrol/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mavlink/qgroundcontrol/statuses/{sha}","languages_url":"https://api.github.com/repos/mavlink/qgroundcontrol/languages","stargazers_url":"https://api.github.com/repos/mavlink/qgroundcontrol/stargazers","contributors_url":"https://api.github.com/repos/mavlink/qgroundcontrol/contributors","subscribers_url":"https://api.github.com/repos/mavlink/qgroundcontrol/subscribers","subscription_url":"https://api.github.com/repos/mavlink/qgroundcontrol/subscription","commits_url":"https://api.github.com/repos/mavlink/qgroundcontrol/commits{/sha}","git_commits_url":"https://api.github.com/repos/mavlink/qgroundcontrol/git/commits{/sha}","comments_url":"https://api.github.com/repos/mavlink/qgroundcontrol/comments{/number}","issue_comment_url":"https://api.github.com/repos/mavlink/qgroundcontrol/issues/comments{/number}","contents_url":"https://api.github.com/repos/mavlink/qgroundcontrol/contents/{+path}","compare_url":"https://api.github.com/repos/mavlink/qgroundcontrol/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mavlink/qgroundcontrol/merges","archive_url":"https://api.github.com/repos/mavlink/qgroundcontrol/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mavlink/qgroundcontrol/downloads","issues_url":"https://api.github.com/repos/mavlink/qgroundcontrol/issues{/number}","pulls_url":"https://api.github.com/repos/mavlink/qgroundcontrol/pulls{/number}","milestones_url":"https://api.github.com/repos/mavlink/qgroundcontrol/milestones{/number}","notifications_url":"https://api.github.com/repos/mavlink/qgroundcontrol/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mavlink/qgroundcontrol/labels{/name}","releases_url":"https://api.github.com/repos/mavlink/qgroundcontrol/releases{/id}","created_at":"2011-10-13T07:31:07Z","updated_at":"2015-03-06T23:29:17Z","pushed_at":"2015-03-06T23:29:17Z","git_url":"git://github.com/mavlink/qgroundcontrol.git","ssh_url":"git@github.com:mavlink/qgroundcontrol.git","clone_url":"https://github.com/mavlink/qgroundcontrol.git","svn_url":"https://github.com/mavlink/qgroundcontrol","homepage":"http://qgroundcontrol.org","size":169413,"stargazers_count":189,"watchers_count":189,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":263,"mirror_url":null,"open_issues_count":189,"forks":263,"open_issues":189,"watchers":189,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mavlink/qgroundcontrol/pulls/1333"},"html":{"href":"https://github.com/mavlink/qgroundcontrol/pull/1333"},"issue":{"href":"https://api.github.com/repos/mavlink/qgroundcontrol/issues/1333"},"comments":{"href":"https://api.github.com/repos/mavlink/qgroundcontrol/issues/1333/comments"},"review_comments":{"href":"https://api.github.com/repos/mavlink/qgroundcontrol/pulls/1333/comments"},"review_comment":{"href":"https://api.github.com/repos/mavlink/qgroundcontrol/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mavlink/qgroundcontrol/pulls/1333/commits"},"statuses":{"href":"https://api.github.com/repos/mavlink/qgroundcontrol/statuses/9f4b6e76f5014a72a1e8e7a0d023664af461272c"}}}}