Don't use hover effects when on mobile #289

Manually merged
johnny9 merged 1 commit from mobile-hover into main 2023-06-01 09:32:50 +00:00 AGit
johnny9 commented 2023-03-14 03:37:49 +00:00 (Migrated from github.com)

Windows
Intel macOS
Apple Silicon macOS
ARM64 Android
ARM32 Android

[![Windows](https://img.shields.io/badge/OS-Windows-green)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/win64/unsecure_win_gui.zip?branch=pull/289) [![Intel macOS](https://img.shields.io/badge/OS-Intel%20macOS-green)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/macos/unsecure_mac_gui.zip?branch=pull/289) [![Apple Silicon macOS](https://img.shields.io/badge/OS-Apple%20Silicon%20macOS-green)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/macos_arm64/unsecure_mac_arm64_gui.zip?branch=pull/289) [![ARM64 Android](https://img.shields.io/badge/OS-Android-green)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/android/unsecure_android_apk.zip?branch=pull/289) [![ARM32 Android](https://img.shields.io/badge/OS-Android%2032bit-green)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/android32/unsecure_android_32bit_apk.zip?branch=pull/289)
jarolrod (Migrated from github.com) reviewed 2023-04-18 02:06:23 +00:00
jarolrod (Migrated from github.com) left a comment

Working well, TextButton is still showing a stuck state

Screenshot_20230417_220038

Working well, TextButton is still showing a stuck state ![Screenshot_20230417_220038](https://user-images.githubusercontent.com/23396902/232651270-949919c0-3bbc-445f-8d7f-1c54c3f196cc.jpg)
johnny9 commented 2023-05-10 17:07:29 +00:00 (Migrated from github.com)

from 6b1c0c0 to 110afe0

  • rebased with main
from[ 6b1c0c0 ](https://github.com/bitcoin-core/gui-qml/commit/6b1c0c0f67c4b3c1832ba83040215b1dacaaa276)to 110afe0 - rebased with main
johnny9 commented 2023-05-11 03:26:12 +00:00 (Migrated from github.com)

@jarolrod I'm not able to reproduce the issue with the TextButton

@jarolrod I'm not able to reproduce the issue with the TextButton
jarolrod commented 2023-05-12 01:12:37 +00:00 (Migrated from github.com)

@johnny9 Press it, hold it, then let go somewhere else on the screen

@johnny9 Press it, hold it, then let go somewhere else on the screen
johnny9 commented 2023-05-12 03:20:45 +00:00 (Migrated from github.com)

I think the apk maybe isn't updating from CI

I think the apk maybe isn't updating from CI
jarolrod (Migrated from github.com) reviewed 2023-05-31 11:21:57 +00:00
jarolrod (Migrated from github.com) commented 2023-05-31 11:21:57 +00:00

Still seeing the issue with the TextButton, I believe this is because there is no "DEFAULT" state to return to after the "PRESSED" state on Android; and we don't see this issue on desktop so must be some API difference related to Android causing the UI issue.

Screenshot_20230531_070221

something along the lines of this should do:

diff --git a/src/qml/controls/TextButton.qml b/src/qml/controls/TextButton.qml
index 0bfafecde..2d8bcf779 100644
--- a/src/qml/controls/TextButton.qml
+++ b/src/qml/controls/TextButton.qml
@@ -39,6 +39,14 @@ Button {
         }
     }
     states: [
+        State {
+            name: "DEFAULT"; when: !root.pressed && !root.hovered
+            PropertyChanges {
+                target: root
+                textColor: root.textColor
+                bgColor: root.bgColor
+            }
+        },
         State {
             name: "PRESSED"; when: root.pressed
             PropertyChanges {
Still seeing the issue with the TextButton, I believe this is because there is no "DEFAULT" state to return to after the "PRESSED" state on Android; and we don't see this issue on desktop so must be some API difference related to Android causing the UI issue. ![Screenshot_20230531_070221](https://git.fish.foo/attachments/4ab3b6e3-a0de-4786-a84d-beac068d44ef) something along the lines of this should do: ```diff diff --git a/src/qml/controls/TextButton.qml b/src/qml/controls/TextButton.qml index 0bfafecde..2d8bcf779 100644 --- a/src/qml/controls/TextButton.qml +++ b/src/qml/controls/TextButton.qml @@ -39,6 +39,14 @@ Button { } } states: [ + State { + name: "DEFAULT"; when: !root.pressed && !root.hovered + PropertyChanges { + target: root + textColor: root.textColor + bgColor: root.bgColor + } + }, State { name: "PRESSED"; when: root.pressed PropertyChanges { ```
johnny9 commented 2023-05-31 23:32:47 +00:00 (Migrated from github.com)

update from 110afe0 to 405a5c8:

  • rebased with main
update from[ 110afe0 ](https://github.com/bitcoin-core/gui-qml/commit/110afe046e4ce4c96ff3bd78b5083e724e1398f0)to 405a5c8: - rebased with main
jarolrod (Migrated from github.com) approved these changes 2023-06-01 05:17:13 +00:00
jarolrod (Migrated from github.com) left a comment

ACK 405a5c8ad6

After the recent rebase, CI is building artifacts again, and this PR now works perfectly.

ACK 405a5c8ad6a1e71370ed294da9561d1ad1dcd22d After the recent rebase, CI is building artifacts again, and this PR now works perfectly.
Sign in to join this conversation.
No description provided.