Custom cursors and high dpi (Windows and MacOS testers needed)

A forum for research and development of the user interface of FreeCAD

Moderator: agryson

mikeprice99
Posts: 78
Joined: Sat Jun 27, 2020 9:06 am
Location: Dorset, England

Re: Custom cursors and high dpi (Windows and MacOS testers needed)

Postby mikeprice99 » Sun Jul 26, 2020 12:15 pm

openBrain wrote:
Sun Jul 26, 2020 11:49 am
Polyline, arc, circle, ellipse, ... cursors are still defined as XPM.
I'll create the svgs: i've already got a few more ready now. Should be finished by end of today. (I have others things I'm also doing)!
User avatar
vanuan
Posts: 179
Joined: Wed Oct 24, 2018 9:49 pm

Re: Custom cursors and high dpi (Windows and MacOS testers needed)

Postby vanuan » Sun Jul 26, 2020 12:51 pm

Let's create a list of files so that I could change the code while SVGs are being prepared.

Code: Select all

        <file>icons/Sketcher_Pointer_Slot.svg</file>
        <file>icons/Sketcher_Pointer_Create_Box.svg</file>
        <file>icons/Sketcher_Pointer_Create_Line.svg</file>
        <file>icons/Sketcher_Pointer_Create_Lineset.svg</file>
        <file>icons/Sketcher_Pointer_Create_Arc.svg</file>
        <file>icons/Sketcher_Pointer_Create_3PointArc.svg</file>
        <file>icons/Sketcher_Pointer_Create_Circle.svg</file>
        <file>icons/Sketcher_Pointer_Create_Ellipse.svg</file>
        <file>icons/Sketcher_Pointer_Create_ArcOfElliple.svg</file>
        <file>icons/Sketcher_Pointer_Create_ArcOfHyperbola.svg</file>
        <file>icons/Sketcher_Pointer_Create_ArcOfParabola.svg</file>
        <file>icons/Sketcher_Pointer_Create_BSpline.svg</file>
        <file>icons/Sketcher_Pointer_Create_3PointCircle.svg</file>
        <file>icons/Sketcher_Pointer_Create_Point.svg</file>
        <file>icons/Sketcher_Pointer_Create_Fillet.svg</file>
        <file>icons/Sketcher_Pointer_Trimming.svg</file>
        <file>icons/Sketcher_Pointer_Extension.svg</file>
        <file>icons/Sketcher_Pointer_Regular_Polygon.svg</file>
        <file>icons/Sketcher_Pointer_External.svg</file>
        <file>icons/Sketcher_Pointer_CarbonCopy.svg</file>
User avatar
vanuan
Posts: 179
Joined: Wed Oct 24, 2018 9:49 pm

Re: Custom cursors and high dpi (Windows and MacOS testers needed)

Postby vanuan » Sun Jul 26, 2020 1:30 pm

PR is done as far as code concerned.

So, what's the plan when/if all SVGs are created? Squash all the commits? Create 2 separate commits, one with SVG files created, another with the code?
mikeprice99
Posts: 78
Joined: Sat Jun 27, 2020 9:06 am
Location: Dorset, England

Re: Custom cursors and high dpi (Windows and MacOS testers needed)

Postby mikeprice99 » Sun Jul 26, 2020 1:42 pm

Thanks for creating that list: gives me a simple target.
Here's a few more ready. Can you check them and make sure you're happy?

The original sample for the slot had filled circles for 'points': I've made all mine with empty circles (like the original XPMs). Which do you prefer and are the circles a good size?
Attachments
Sketcher_Pointer_Create_Point.svg
(406 Bytes) Downloaded 5 times
Sketcher_Pointer_Create_Fillet.svg
(458 Bytes) Downloaded 3 times
Sketcher_Pointer_Arc.svg
(499 Bytes) Downloaded 3 times
Sketcher_Pointer_3PointArc.svg
(537 Bytes) Downloaded 3 times
User avatar
vanuan
Posts: 179
Joined: Wed Oct 24, 2018 9:49 pm

Re: Custom cursors and high dpi (Windows and MacOS testers needed)

Postby vanuan » Sun Jul 26, 2020 3:21 pm

mikeprice99 wrote:
Sun Jul 26, 2020 1:42 pm
Thanks for creating that list: gives me a simple target.
Here's a few more ready. Can you check them and make sure you're happy?
Could you please make a crosshair of pure white, like in the original XPM?
This is important for color replacement functionality.
mikeprice99 wrote:
Sun Jul 26, 2020 1:42 pm
The original sample for the slot had filled circles for 'points': I've made all mine with empty circles (like the original XPMs). Which do you prefer and are the circles a good size?
I think transparent ones are preferable to the ones with a white fill.
User avatar
vanuan
Posts: 179
Joined: Wed Oct 24, 2018 9:49 pm

Re: Custom cursors and high dpi (Windows and MacOS testers needed)

Postby vanuan » Sun Jul 26, 2020 3:32 pm

PR updated. Remaining SVGs so far:

Code: Select all

        <file>icons/Sketcher_Pointer_Create_3PointCircle.svg</file>
        <file>icons/Sketcher_Pointer_Create_ArcOfElliple.svg</file>
        <file>icons/Sketcher_Pointer_Create_ArcOfHyperbola.svg</file>
        <file>icons/Sketcher_Pointer_Create_ArcOfParabola.svg</file>
        <file>icons/Sketcher_Pointer_Create_BSpline.svg</file>
        <file>icons/Sketcher_Pointer_Create_Circle.svg</file>
        <file>icons/Sketcher_Pointer_Create_Ellipse.svg</file>
        <file>icons/Sketcher_Pointer_Create_Lineset.svg</file>
        <file>icons/Sketcher_Pointer_Extension.svg</file>
        <file>icons/Sketcher_Pointer_Trimming.svg</file>
mikeprice99
Posts: 78
Joined: Sat Jun 27, 2020 9:06 am
Location: Dorset, England

Re: Custom cursors and high dpi (Windows and MacOS testers needed)

Postby mikeprice99 » Sun Jul 26, 2020 4:10 pm

vanuan wrote:
Sun Jul 26, 2020 3:21 pm
I think transparent ones are preferable to the ones with a white fill.
None had white fill: all have transparent fill, but the original sample had red fill.

I think I've only three more to do.
<file>icons/Sketcher_Pointer_Create_ArcOfEllipse.svg</file>
<file>icons/Sketcher_Pointer_Create_ArcOfHyperbola.svg</file>
<file>icons/Sketcher_Pointer_Create_ArcOfParabola.svg</file>

I've attached five more of the ones I've done so far.
(limit on files attached to a post)
Attachments
Sketcher_Pointer_Create_Lineset.svg
(540 Bytes) Downloaded 4 times
Sketcher_Pointer_Create_Fillet.svg
(458 Bytes) Downloaded 3 times
Sketcher_Pointer_Create_Ellipse.svg
(500 Bytes) Downloaded 3 times
Sketcher_Pointer_Create_Circle.svg
(461 Bytes) Downloaded 4 times
Sketcher_Pointer_Create_BSpline.svg
(632 Bytes) Downloaded 3 times
mikeprice99
Posts: 78
Joined: Sat Jun 27, 2020 9:06 am
Location: Dorset, England

Re: Custom cursors and high dpi (Windows and MacOS testers needed)

Postby mikeprice99 » Sun Jul 26, 2020 4:16 pm

<file>icons/Sketcher_Pointer_Extension.svg</file>
<file>icons/Sketcher_Pointer_Trimming.svg</file>

just leaves three more to do....
Attachments
Sketcher_Pointer_Extension.svg
(506 Bytes) Downloaded 4 times
Sketcher_Pointer_Trimming.svg
(554 Bytes) Downloaded 4 times
mikeprice99
Posts: 78
Joined: Sat Jun 27, 2020 9:06 am
Location: Dorset, England

Re: Custom cursors and high dpi (Windows and MacOS testers needed)

Postby mikeprice99 » Sun Jul 26, 2020 4:43 pm

These Sketcher_Pointer_Arc* cursors seem to be very similar: ArcOfEllipse I think is identical to ArcOfParabola - so you can simply copy and paste with that name.

None of them look anything like the images on the Buttons. Should I redesign them to look more like the button images?
Attachments
Sketcher_Pointer_Create_ArcOfParabola.svg
(465 Bytes) Downloaded 4 times
Sketcher_Pointer_Create_ArcOfHyperbola.svg
(465 Bytes) Downloaded 3 times
User avatar
vanuan
Posts: 179
Joined: Wed Oct 24, 2018 9:49 pm

Re: Custom cursors and high dpi (Windows and MacOS testers needed)

Postby vanuan » Sun Jul 26, 2020 8:02 pm

All SVGs incorporated. Rebased and squashed.
None of them look anything like the images on the Buttons. Should I redesign them to look more like the button images?
The primary focus of my PR is to convert XPM to SVG and scale them according to the OS high DPI setting.
If you want to overhaul SVG icons, let's do it in a separate PR.