Skip to content

Don't use hover effects when on mobile - #289

Merged
hebasto merged 1 commit into
bitcoin-core:mainfrom
johnny9:mobile-hover
Jun 1, 2023
Merged

hebasto merged 1 commit into
bitcoin-core:mainfrom
johnny9:mobile-hover

Conversation

@johnny9

@johnny9 johnny9 commented Mar 14, 2023 •

Copy link
Copy Markdown
Collaborator

Windows
Intel macOS
Apple Silicon macOS
ARM64 Android
ARM32 Android

@johnny9
johnny9 marked this pull request as draft March 14, 2023 03:38
@johnny9
johnny9 marked this pull request as ready for review March 25, 2023 14:20
@hebasto hebasto added the UX Designers' opinions are required label Apr 17, 2023
@jarolrod jarolrod added Needs design review Designer's review needed Bug Something isn't working labels Apr 17, 2023

@jarolrod jarolrod left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working well, TextButton is still showing a stuck state

Screenshot_20230417_220038

@jarolrod jarolrod added this to the v1.0 milestone May 10, 2023
@johnny9

johnny9 commented May 10, 2023

Copy link
Copy Markdown
Collaborator Author

from 6b1c0c0 to 110afe0

  • rebased with main

@johnny9

johnny9 commented May 11, 2023

Copy link
Copy Markdown
Collaborator Author

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

@jarolrod

Copy link
Copy Markdown
Contributor

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

@johnny9

johnny9 commented May 12, 2023

Copy link
Copy Markdown
Collaborator Author

I think the apk maybe isn't updating from CI

property bool rightalign: false
padding: 15
hoverEnabled: true
hoverEnabled: AppMode.isDesktop

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 {

@johnny9

johnny9 commented May 31, 2023

Copy link
Copy Markdown
Collaborator Author

update from 110afe0 to 405a5c8:

  • rebased with main

@jarolrod jarolrod left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 405a5c8

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

@hebasto
hebasto merged commit 9847663 into bitcoin-core:main Jun 1, 2023
hebasto added a commit that referenced this pull request Jun 4, 2023
8eac738 qml: setup AppMode in initerrormessage (jarolrod)

Pull request description:

  If you run the GUI with an invalid parameter, the `initerrormessage` window should appear. But, #289 introduced a dependency on `AppMode` being available into the `OutlineButton` which the `initerrormessage` window uses. So, the following appears on master and the `initerrormessage` window does not appear:

  ```
  $ ./src/qt/bitcoin-qt -signsadfsad
  Error: Cannot parse command line arguments: Invalid parameter -signsadfsad

  QQmlApplicationEngine failed to load component
  qrc:/qml/pages/initerrormessage.qml:32:9: Type OutlineButton unavailable
  qrc:/qml/controls/OutlineButton.qml:7:1: module "org.bitcoincore.qt" is not installed
  ```

  This encapsulates the setting of AppMode into a function, and runs in within the `InitErrorMessageBox` function:

  <img width="612" alt="Screen Shot 2023-06-03 at 12 52 55 AM" src="https://github.com/bitcoin-core/gui-qml/assets/23396902/aa46d32f-855e-46b2-b219-d77319f6d492">

  [![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/344)
  [![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/344)
  [![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/344)
  [![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/344)
  [![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/344)

ACKs for top commit:
  johnny9:
    ACK 8eac738

Tree-SHA512: 24c31154ab4f7efd6b718f799bd4aafc79d56cdc4aad82a66db2d0618eaf24730c905dc8c958b44b9f90b7e9bbbccb30a717dfd7e70e2170820fa4478fac8487
johnny9 pushed a commit to johnny9/bitcoin-core-app that referenced this pull request Jul 4, 2025
7f5f34d qml: don't use hover effects when on mobile (johnny9)

Pull request description:

  [![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)

ACKs for top commit:
  jarolrod:
    ACK 7f5f34d

Tree-SHA512: a0bc17ef6069d10def0c21d10205bf409a8c0f301126f5bb7dff157b1a5e04750f3d46c1ff57cbecc08ab3a90d645d8a56d7c493d7e03b40a3af64df108d90d3
johnny9 pushed a commit to johnny9/bitcoin-core-app that referenced this pull request Jul 4, 2025
96724c2 qml: setup AppMode in initerrormessage (jarolrod)

Pull request description:

  If you run the GUI with an invalid parameter, the `initerrormessage` window should appear. But, bitcoin-core/gui-qml#289 introduced a dependency on `AppMode` being available into the `OutlineButton` which the `initerrormessage` window uses. So, the following appears on master and the `initerrormessage` window does not appear:

  ```
  $ ./src/qt/bitcoin-qt -signsadfsad
  Error: Cannot parse command line arguments: Invalid parameter -signsadfsad

  QQmlApplicationEngine failed to load component
  qrc:/qml/pages/initerrormessage.qml:32:9: Type OutlineButton unavailable
  qrc:/qml/controls/OutlineButton.qml:7:1: module "org.bitcoincore.qt" is not installed
  ```

  This encapsulates the setting of AppMode into a function, and runs in within the `InitErrorMessageBox` function:

  <img width="612" alt="Screen Shot 2023-06-03 at 12 52 55 AM" src="https://github.com/bitcoin-core/gui-qml/assets/23396902/aa46d32f-855e-46b2-b219-d77319f6d492">

  [![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/344)
  [![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/344)
  [![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/344)
  [![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/344)
  [![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/344)

ACKs for top commit:
  johnny9:
    ACK 96724c2

Tree-SHA512: 24c31154ab4f7efd6b718f799bd4aafc79d56cdc4aad82a66db2d0618eaf24730c905dc8c958b44b9f90b7e9bbbccb30a717dfd7e70e2170820fa4478fac8487
tx-signer450 added a commit to tx-signer450/gui-qml that referenced this pull request Oct 20, 2025
7f5f34d82b329c37c8aca63a53fac34f838c8e9a qml: don't use hover effects when on mobile (johnny9)

Pull request description:

  [![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)

ACKs for top commit:
  jarolrod:
    ACK 7f5f34d82b329c37c8aca63a53fac34f838c8e9a

Tree-SHA512: a0bc17ef6069d10def0c21d10205bf409a8c0f301126f5bb7dff157b1a5e04750f3d46c1ff57cbecc08ab3a90d645d8a56d7c493d7e03b40a3af64df108d90d3
tx-signer450 added a commit to tx-signer450/gui-qml that referenced this pull request Oct 20, 2025
96724c29a89849a43cdfa674c19d172111bcbda2 qml: setup AppMode in initerrormessage (jarolrod)

Pull request description:

  If you run the GUI with an invalid parameter, the `initerrormessage` window should appear. But, bitcoin-core/gui-qml#289 introduced a dependency on `AppMode` being available into the `OutlineButton` which the `initerrormessage` window uses. So, the following appears on master and the `initerrormessage` window does not appear:

  ```
  $ ./src/qt/bitcoin-qt -signsadfsad
  Error: Cannot parse command line arguments: Invalid parameter -signsadfsad

  QQmlApplicationEngine failed to load component
  qrc:/qml/pages/initerrormessage.qml:32:9: Type OutlineButton unavailable
  qrc:/qml/controls/OutlineButton.qml:7:1: module "org.bitcoincore.qt" is not installed
  ```

  This encapsulates the setting of AppMode into a function, and runs in within the `InitErrorMessageBox` function:

  <img width="612" alt="Screen Shot 2023-06-03 at 12 52 55 AM" src="https://github.com/bitcoin-core/gui-qml/assets/23396902/aa46d32f-855e-46b2-b219-d77319f6d492">

  [![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/344)
  [![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/344)
  [![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/344)
  [![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/344)
  [![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/344)

ACKs for top commit:
  johnny9:
    ACK 96724c29a89849a43cdfa674c19d172111bcbda2

Tree-SHA512: 24c31154ab4f7efd6b718f799bd4aafc79d56cdc4aad82a66db2d0618eaf24730c905dc8c958b44b9f90b7e9bbbccb30a717dfd7e70e2170820fa4478fac8487
johnny9 added a commit to johnny9/gui-qml that referenced this pull request Jun 14, 2026
johnny9 pushed a commit to johnny9/gui-qml that referenced this pull request Jun 14, 2026
7f5f34d qml: don't use hover effects when on mobile (johnny9)

Pull request description:

  [![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)

ACKs for top commit:
  jarolrod:
    ACK 7f5f34d

Rebased-From: 9847663
Github-Pull: bitcoin-core#289
johnny9 pushed a commit to johnny9/gui-qml that referenced this pull request Jun 14, 2026
96724c2 qml: setup AppMode in initerrormessage (jarolrod)

Pull request description:

  If you run the GUI with an invalid parameter, the `initerrormessage` window should appear. But, bitcoin-core#289 introduced a dependency on `AppMode` being available into the `OutlineButton` which the `initerrormessage` window uses. So, the following appears on master and the `initerrormessage` window does not appear:

  ```
  $ ./src/qt/bitcoin-qt -signsadfsad
  Error: Cannot parse command line arguments: Invalid parameter -signsadfsad

  QQmlApplicationEngine failed to load component
  qrc:/qml/pages/initerrormessage.qml:32:9: Type OutlineButton unavailable
  qrc:/qml/controls/OutlineButton.qml:7:1: module "org.bitcoincore.qt" is not installed
  ```

  This encapsulates the setting of AppMode into a function, and runs in within the `InitErrorMessageBox` function:

  <img width="612" alt="Screen Shot 2023-06-03 at 12 52 55 AM" src="https://github.com/bitcoin-core/gui-qml/assets/23396902/aa46d32f-855e-46b2-b219-d77319f6d492">

  [![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/344)
  [![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/344)
  [![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/344)
  [![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/344)
  [![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/344)

ACKs for top commit:
  johnny9:
    ACK 96724c2

Rebased-From: 7b88d03
Github-Pull: bitcoin-core#344
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working Needs design review Designer's review needed UX Designers' opinions are required

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants