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 »

.. and if anyone's interested I've built my own app (currently windows only but should able to compile for Ubuntu) to automate most of the cleanup process:
SVGEditor.png
SVGEditor.png (69.68 KiB) Viewed 1663 times
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

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

Post by vocx »

mikeprice99 wrote: Thu Jul 30, 2020 11:27 am .. and if anyone's interested I've built my own app (currently windows only but should able to compile for Ubuntu) to automate most of the cleanup process:
Wait, what?

Since you know about SVG, maybe you can take a look at the open pull request #3749. I basically move the functions outside the main getSVG function, so each of them can be tested individually. I did not change the logic of the code significantly, I mostly cleaned up a few things.

This code is responsible for generating the SVG for export from the Draft Workbench, through the importSVG module. The getSVG code is used also indirectly by TechDraw in order to project specific objects from Draft/Arch (TechDraw_ArchView).
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

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

Post by vocx »

mikeprice99 wrote: Sat Jul 25, 2020 10:51 am If you do want the cursors recreated in svg, it's now taking me less than 5 minutes per cursor.
...
I compiled the new branch and saw the new cursors. They look good.

The Sketcher_Trimming (Sketcher_Pointer_Trimming.svg) and Sketcher_Extend (Sketcher_Pointer_Extension.svg) tools, however, look a bit weak because they use a dashed line. Maybe a thicker line, or less segments, could be used.

The Sketcher CreateSlot (Sketcher_Pointer_Slot.svg) looks like an ellipse and not a slot, so this one should be modified. See my mockup.
cursor_slot_new.svg.png
cursor_slot_new.svg.png (6.44 KiB) Viewed 1626 times
cursor_slot_new.svg
(4.14 KiB) Downloaded 84 times
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
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 »

@vocx I agree!. This should fix it. (Also changed crosshairs to white as requested.)
cursor_slot_new.png
cursor_slot_new.png (1.74 KiB) Viewed 1611 times
With regard to the PR you mentioned, are there any specific problems? If so, I'd recommend a separate topic in the forum.
Attachments
cursor_slot_new.svg
(464 Bytes) Downloaded 53 times
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

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

Post by vocx »

mikeprice99 wrote: Thu Jul 30, 2020 4:54 pm ...
With regard to the PR you mentioned, are there any specific problems? If so, I'd recommend a separate topic in the forum.
There are no specific problems, I was just hoping you would check the SVG generation is correct. That code was not written by me (I haven't read the SVG specifications), but by other authors over the years, so I was just hoping that if you see a problem that can be fixed easily then you let me know. But if you want to make more improvements then go ahead (but maybe you would also need to become more familiar with the Draft Workbench code).
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
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 »

vocx wrote: Thu Jul 30, 2020 5:01 pm ... but maybe you would also need to become more familiar with the Draft Workbench code
I wouldn't want to touch it before becoming very familiar with draft workbench.

However, skimming through the original getSVG.py file I did note that in just 4 places stroke-width has been specified in pixels. No other values are specified in pixels. This could cause unexpected line widths.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

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

Post by Kunda1 »

mikeprice99 wrote: Thu Jul 30, 2020 5:23 pm However, skimming through the original getSVG.py file I did note that in just 4 places stroke-width has been specified in pixels. No other values are specified in pixels. This could cause unexpected line widths.
Probably opening a ticket to track this would be important.
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

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

Post by vocx »

mikeprice99 wrote: Thu Jul 30, 2020 4:54 pm ...
With regard to the PR you mentioned, are there any specific problems? If so, I'd recommend a separate topic in the forum.
Let us keep discussions about Draft SVG here, Improvements in SVG
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
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 »

New sketcher slot icon incorporated. This PR is getting larger and larger. I'm afraid it's getting harder to review. Would you suggest I create a separate PR or continue improvements in this one?

Further changes are going to be more intrusive. I don't want them to block the work we've already done. Is there a list of reviewers/contributors with push access I can ping? Is there a more interactive channel of communication? Say, a quick video chat so I can walk you through the changes and demonstrate how it works? Anything I can do to speed up the review...
openBrain
Veteran
Posts: 9041
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

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

Post by openBrain »

vanuan wrote: Sun Aug 02, 2020 4:31 am New sketcher slot icon incorporated. This PR is getting larger and larger. I'm afraid it's getting harder to review. Would you suggest I create a separate PR or continue improvements in this one?

This PR should still be small compared to some other ones. It should be a problem if your commits are ordered/squashed correctly. I didn't check but typically this one should have go as a 'fixup' of the one where you introduced the previous slot icon, so the double change is erased.

Further changes are going to be more intrusive. I don't want them to block the work we've already done. Is there a list of reviewers/contributors with push access I can ping? Is there a more interactive channel of communication? Say, a quick video chat so I can walk you through the changes and demonstrate how it works? Anything I can do to speed up the review...
@vocx already explained PR can take weeks/months to be merged. It depends on reviewers/maintainers spare time and willing. Moreover IMO there are very more important PRs in the queue, especially ones that shall be merged before 0.19 is released.
If you still have time and energy, you can go through the bug tracker and help fixing, or start to improve in other fields. ;)
Post Reply