-
-
Notifications
You must be signed in to change notification settings - Fork 979
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
Microscopic Mouse Cursor on HiRes Display #1765
Comments
Could someone help me confirm this issue? I am using standard 1920x1080 screens here. |
I did some poking around the source and I found the following in /LibreCAD-master/librecad/src/ui/qg_graphicview.cpp:
Am I correct in my thinking that in Windows the system cursor size is used, but in Linux and MacOS it would be fixed at 15 pixels? The Qt documentation lists, among a whole bunch of additionsl OSes, "Q_OS_LINUX" and "Q_OS_MACOS" |
Cursors are controlled by Qt. We can set the pixel sizes, but for cursors (and other GUI items, except drawing in coordinated), the pixels are in device independent units for Qt, meaning Qt will scale them by a factor, if high dpi device is detected. It helps to play with this value still |
I changed line 69 in /LibreCAD-master/librecad/src/ui/qg_graphicview.cpp from ...and it seemed to do the trick (in a Debian VM at various resolutions from 1920x1080 to 3840x2160) and it remained at an appropriate size (if not larger in LC than the system cursor). I compared the native LC I compiled to the most recent appImage. (Can you try it on your Windows PC?) |
It means for all systems we are targeting |
The three installation packages (Win64, appImage, dmg) would be addressed with I haven't seen any comments about macOS and I don't have access to Mac, so Im guessing it woiuld be the same problem on a Mac with a hi-res screen with the way it is currently defined... |
I will test on Mac. Could you create a PR? |
I don't have a full develoipment environment set up so I cannot create a PR right now. It is a minor edit: Change line 69 in /LibreCAD-master/librecad/src/ui/qg_graphicview.cpp from Does LC still need a Win32 variant? |
Could you test this fix? 32bit windows is gone in the new development branch. However, we should be careful when removing win32 definitions in source code, because win32 is also used for 64bit windows |
Here are a few comparisons (g_cursorSize=32): compiled with latest commit at @3840x2160 previous version of appimage @2560x1080 "w/commit at @2560x1080 And just because I was curious (g_cursorSize=16): (These screen captures are cropped and enlarged. At native resolution the cursors are much smaller.) It seems the g_cursorSize is a default but overridden by system(?) Or a max / min? What ever the case, much better! |
The latest appImage (LibreCAD-latest-1-g3112c123.AppImage) fails with ... error while loading shared libraries: libQt6Svg.so.6: cannot open shared object file: No such file or directory |
The specified 32 is treated as device independent pixels, so ended up roughly the same size on different physical pixel pitches |
Good news and bad news. I downloaded the latest appImage and yes, it launches. The bad news is that the cursor is still tiny - but only when launching from the appImage. I also download the latest source and compiled it from scratch and it works correctly - with a larger cursor. |
...having said that - I may have introduced something I shouldn't have - I compiled LC with QT6 libraries. I extracted the AppImage and looked at the contents - it uses QT5 libraries. |
No, we are using qt6 with qt6 compatibility modules. It's clear, if you check the workflow file : it's built with qmake6 |
I think you are looking at a wrong file. You can run AppImage with the option "--appimage-mount" to mount at investigate. |
Let's keep tracking at issue #1787 |
Expected behavior
LC retains system mouse curor size or cursor size is configuarble within LC.
Observed behavior
The mouse cursor in LC is a fraction of the system mouse cursor.
Steps to reproduce or sample file
Set system mouse cursor to maximum size
Move mouse from desktop panel to LC application window.
Mouse cursor changes size becoming much, much smaller (and hard to find in the drawing window).
Operating System and LibreCAD version info
Version: 2.2.1_alpha-424-g806e61d0
Compiler: GNU GCC 11.4.0
Compiled on: Apr 25 2024
Qt Version: 5.15.3
Boost Version: 1.74.0
System: Debian GNU/Linux trixie/sid
Other:
Cinnamon desktop
Display is 3840x2160
The text was updated successfully, but these errors were encountered: