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

A forum for research and development of the user interface of FreeCAD
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
mikeprice99
Posts: 100
Joined: Sat Jun 27, 2020 9:06 am
Location: Dorset, England

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

Post by mikeprice99 »

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: 539
Joined: Wed Oct 24, 2018 9:49 pm

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

Post by vanuan »

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: 539
Joined: Wed Oct 24, 2018 9:49 pm

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

Post by vanuan »

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: 100
Joined: Sat Jun 27, 2020 9:06 am
Location: Dorset, England

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

Post by mikeprice99 »

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 53 times
Sketcher_Pointer_Create_Fillet.svg
(458 Bytes) Downloaded 68 times
Sketcher_Pointer_Arc.svg
(499 Bytes) Downloaded 49 times
Sketcher_Pointer_3PointArc.svg
(537 Bytes) Downloaded 62 times
User avatar
vanuan
Posts: 539
Joined: Wed Oct 24, 2018 9:49 pm

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

Post by vanuan »

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: 539
Joined: Wed Oct 24, 2018 9:49 pm

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

Post by vanuan »

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: 100
Joined: Sat Jun 27, 2020 9:06 am
Location: Dorset, England

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

Post by mikeprice99 »

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 38 times
Sketcher_Pointer_Create_Fillet.svg
(458 Bytes) Downloaded 53 times
Sketcher_Pointer_Create_Ellipse.svg
(500 Bytes) Downloaded 59 times
Sketcher_Pointer_Create_Circle.svg
(461 Bytes) Downloaded 64 times
Sketcher_Pointer_Create_BSpline.svg
(632 Bytes) Downloaded 44 times
mikeprice99
Posts: 100
Joined: Sat Jun 27, 2020 9:06 am
Location: Dorset, England

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

Post by mikeprice99 »

<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 48 times
Sketcher_Pointer_Trimming.svg
(554 Bytes) Downloaded 55 times
mikeprice99
Posts: 100
Joined: Sat Jun 27, 2020 9:06 am
Location: Dorset, England

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

Post by mikeprice99 »

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 62 times
Sketcher_Pointer_Create_ArcOfHyperbola.svg
(465 Bytes) Downloaded 47 times
User avatar
vanuan
Posts: 539
Joined: Wed Oct 24, 2018 9:49 pm

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

Post by vanuan »

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