Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows|??? - Qt 6 builds incorrectly map mouse position to pattern/order rows #406

Closed
nyanpasu64 opened this issue Aug 22, 2021 · 3 comments
Labels
bug Something isn't working qt: 6.x Affects experimental Qt6 (version 6.x)

Comments

@nyanpasu64
Copy link
Contributor

Checklist

  • I am reporting exactly 1 bug with this issue.
  • This bug hasn't already been reported.
  • This bug hasn't already been fixed in the latest development build.

Bug Description

In the Qt 6 builds, when hovering rows above the center of the pattern/order editors, the tracker highlights one row above the mouse cursor (even without DPI scaling).

How to reproduce

  1. Download BambooTracker "Windows 10 64-bit" (Qt 6 based) and open a demo module. (The bug does not occur in Qt 5 builds.)
  2. Scroll down in the order list and pattern editor.
  3. Hover rows above the cursor in the order list (wrong highlight), rows above the cursor in the pattern editor (wrong highlight), and rows in previous patterns (correct highlight).

System Information

  • Operating System: Windows 10
  • BambooTracker Version: 0.5.0 and master a777b4f
  • Build Type: Official and self-built
@nyanpasu64 nyanpasu64 added the bug Something isn't working label Aug 22, 2021
@OPNA2608 OPNA2608 added the qt: 6.x Affects experimental Qt6 (version 6.x) label Aug 22, 2021
@rerrahkr
Copy link
Member

Thank you for your report. Qt6 uses QPointF position() to get the cursor position for mouse hover events, but there was a problem with the implicit type conversion from double to int. I fixed it in d236c97.

@nyanpasu64
Copy link
Contributor Author

qCeil() and qFloor() may be more concise because it automatically casts the result to int. Is the codepath you edited Qt6-specific or Qt5 as well?

@rerrahkr
Copy link
Member

It is common in Qt 5 and 6.

@rerrahkr rerrahkr closed this as completed Aug 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working qt: 6.x Affects experimental Qt6 (version 6.x)
Projects
None yet
Development

No branches or pull requests

3 participants