LMMS / lmms

Cross-platform music production software
https://lmms.io
GNU General Public License v2.0
8.2k stars 1.01k forks source link

Wrong `pointer` cursor #6256

Open owzim opened 2 years ago

owzim commented 2 years ago

The pointer cursor in LMMS does not match the system pointer cursor.

Steps to reproduce

Just hover over some clickable area, for example in the the bassline editor.

Expected behavior

The system cursor for pointer is used.

Actual behavior

A custom/old/default cursor is used.

Screenshot

The actual system cursor (in my case from the Yaru theme)

Testable on https://developer.mozilla.org/en-US/docs/Web/CSS/cursor

Screenshot from 2022-01-02 21-14-48

The cursor in LMMS

Screenshot from 2022-01-02 21-09-18

Affected LMMS versions

1.2.2 AppImage on Pop!_OS 20.04 LTS with xorg

Monospace-V commented 2 years ago

All OS's. LMMS has a different pointing hand than that of the system cursor. and all versions.

Rossmaxx commented 7 months ago

Should this be considered an issue?

michaelgregorius commented 7 months ago

With the current implementation it's even "inconsistent" between themes. So the underlying question is if LMMS wants to be consistent with the desktop environment or if it wants to have its own style(s).

If it is decided to be consistent with the desktop environment then one simply has to search for the string "hand" (with the quotes!) in the context of QCursor and replace for example QCursor( embed::getIconPixmap( "hand" ) ) with QCursor(Qt::PointingHandCursor).

Rossmaxx commented 7 months ago

So wouldn't it be better to use OS's hand cursor instead of the theme one?

Spekular commented 7 months ago

Several cursors that we need aren't provided by the OS:

So the real decision to be made is if we want internally consistent cursors or not. Native cursors everywhere is not an option, so we can either have LMMS-style cursors everywhere, or a mix of native and LMMS cursors.

Rossmaxx commented 7 months ago

Several cursors that we need aren't provided by the OS:

  • Grab left / right edge
    • Knife

We can use LMMS cursors for those, but for those which exists, i prefer OS native ones.

michaelgregorius commented 7 months ago

Another option would be to make the internal cursors optional. If the theme provides one then that one is used and otherwise a specified system cursor is used. In that case an initialization might look as follows:

m_cursorHand(getThemeCursorOrSystemCursor("hand", Qt::PointingHandCursor))

In this example getThemeCursorOrSystemCursor would first try to load the pixmap "hand" from the artwork/theme and if that is not available Qt::PointingHandCursor is used. The return value is a QCursor.

Monospace-V commented 7 months ago

Most themes have the default pointing hand in the style directory. Even the classic and default theme. image While a possible fix is to remove the pointing hand asset from the directory itself, this may cause inconsistencies in some cases. One may be more comfortable using the theme's hand against the theme rather than their preset. There may be cases the default hand isn't optimised for the theme or the theme has a hand to match. Making them optional is something we could do, but note the above cases. A toggle seems like too much effort. image