Giter Club home page Giter Club logo

Comments (21)

GSStnb avatar GSStnb commented on May 25, 2024 1

Here area couple of screen capture showing the difference (zoomed 200%):
MouseCursorSystem
MouseCursor-LC
The system setting for the mouse cursor is just Small to Large. The panel height is 40 pixels, so the system mouse cursor is +/- 24. In LC it is maybe 16 pixels.

from librecad.

GSStnb avatar GSStnb commented on May 25, 2024 1

I changed line 69 in /LibreCAD-master/librecad/src/ui/qg_graphicview.cpp from
#if (defined (Q_OS_WIN32) || defined (Q_OS_WIN64))
to
#if (defined (Q_OS_WIN32) || defined (Q_OS_WIN64) || defined (Q_OS_LINUX) || defined (Q_OS_MACOS))

...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?)

from librecad.

GSStnb avatar GSStnb commented on May 25, 2024 1

The three installation packages (Win64, appImage, dmg) would be addressed with
#if (defined (Q_OS_WIN64) || defined (Q_OS_LINUX) || defined (Q_OS_MACOS))
while remaining OSes would default to the defined CURSOR_SIZE.

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...

from librecad.

dxli avatar dxli commented on May 25, 2024

Could someone help me confirm this issue?

I am using standard 1920x1080 screens here.

from librecad.

GSStnb avatar GSStnb commented on May 25, 2024

I did some poking around the source and I found the following in /LibreCAD-master/librecad/src/ui/qg_graphicview.cpp:

#if (defined (Q_OS_WIN32) || defined (Q_OS_WIN64))
    #define CURSOR_SIZE 16
#else
    #define CURSOR_SIZE 15
#endif

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"

from librecad.

dongxuli-concord-design avatar dongxuli-concord-design commented on May 25, 2024

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.
So, the size 16 may mean 32 actual pixels on high dpi.

It helps to play with this value still

from librecad.

dongxuli-concord-design avatar dongxuli-concord-design commented on May 25, 2024

It means for all systems we are targeting

from librecad.

dxli avatar dxli commented on May 25, 2024

I will test on Mac.

Could you create a PR?

from librecad.

GSStnb avatar GSStnb commented on May 25, 2024

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
#if (defined (Q_OS_WIN32) || defined (Q_OS_WIN64))
to
#if (defined (Q_OS_WIN64) || defined (Q_OS_LINUX) || defined (Q_OS_MACOS))

Does LC still need a Win32 variant?

from librecad.

dxli avatar dxli commented on May 25, 2024

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

from librecad.

GSStnb avatar GSStnb commented on May 25, 2024

Here are a few comparisons (g_cursorSize=32):
previous version of appimage @3840x2160
appImage-3840x2160-32pxl
Actual cursor ~20 pixels

compiled with latest commit at @3840x2160
3840x2160-32pxl
Actual cursor ~54 pixels

previous version of appimage @2560x1080
appImage-2560x1080-32pxl
Actual cursor ~40 pixels

"w/commit at @2560x1080
2560x1080-32pxl
Actual cursor ~54 pixels

And just because I was curious (g_cursorSize=16):
2560x1080-16pxl
Actual cursor ~58 pixels

(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!

from librecad.

GSStnb avatar GSStnb commented on May 25, 2024

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

from librecad.

dxli avatar dxli commented on May 25, 2024

The specified 32 is treated as device independent pixels, so ended up roughly the same size on different physical pixel pitches

from librecad.

dxli avatar dxli commented on May 25, 2024

I just tested the latest master branch AppImage: 581dc21

The AppImage works for me, and there's only minor changes from 3112c12

from librecad.

GSStnb avatar GSStnb commented on May 25, 2024

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.

from librecad.

GSStnb avatar GSStnb commented on May 25, 2024

...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.

from librecad.

dxli avatar dxli commented on May 25, 2024

No, we are using qt6 with qt6 compatibility modules. It's clear, if you check the workflow file : it's built with qmake6

from librecad.

GSStnb avatar GSStnb commented on May 25, 2024

Are these not QT5 libraries?
Libraries

from librecad.

dxli avatar dxli commented on May 25, 2024

I think you are looking at a wrong file.

You can run AppImage with the option "--appimage-mount" to mount at investigate.

from librecad.

GSStnb avatar GSStnb commented on May 25, 2024

I ran the AppImage with the option "--appimage-extract", "--appimage-mount" shows the same thing:
Screenshot from 2024-05-12 18-45-50

from librecad.

dxli avatar dxli commented on May 25, 2024

Let's keep tracking at issue #1787

from librecad.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.