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 8:54 pm

vanuan wrote:
Sun Jul 26, 2020 8:02 pm
If you want to overhaul SVG icons, let's do it in a separate PR.
As long as you're happy with what I've given, then I'm happy. Let's not add any complications.
jmaustpc
Posts: 9854
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

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

Postby jmaustpc » Mon Jul 27, 2020 12:41 am

mikeprice99 wrote:
Sun Jul 26, 2020 8:54 pm
vanuan wrote:
Sun Jul 26, 2020 8:02 pm
If you want to overhaul SVG icons, let's do it in a separate PR.
As long as you're happy with what I've given, then I'm happy. Let's not add any complications.
Hi guys, I have not looked at the code etc. however two thoughts, ideally all Mike's SVG files should be in one git commit but regardless he should create a git repo and commit his files to it and then vanuan should pull that so that although it can be one PR to FreeCAD, it will show up in the git history as two commits and hence credit to each person's work.

Secondly Mike, I have not looked but have you included an appropriate licence within the SVG file? If you open the SVG file in a text editor you will see the licence section. I only just now thought about that. :)

Jim
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 » Mon Jul 27, 2020 9:06 am

jmaustpc wrote:
Mon Jul 27, 2020 12:41 am

Secondly Mike, I have not looked but have you included an appropriate licence within the SVG file? If you open the SVG file in a text editor you will see the licence section. I only just now thought about that. :)
I think Mike intentionally doesn't want any metadata which isn't used in the production app. Add several kilobytes to each svg and you've got several megabytes of wasted space. Of course, it's zipped and extracted to /tmp but it's still an overhead.

I think ideally, there should be some script/cmake step which "cleans" svg files. But that's totally unrelated to this PR. So maybe we can simply add a LICENSE file to the folder and list all credits there.
User avatar
bitacovir
Posts: 1036
Joined: Sat Apr 19, 2014 6:23 am
Contact:

Re: Custom cursors and high dpi

Postby bitacovir » Mon Jul 27, 2020 12:28 pm

vanuan wrote:
Tue Jul 21, 2020 7:48 pm
bitacovir wrote:
Sat Jul 18, 2020 2:48 pm

Is this what you want?

First SVG cursor is ready to review!

Now the problem is with constraints icons: https://github.com/FreeCAD/FreeCAD/tree ... cons/small

Screenshot from 2020-07-21 22-34-43.png

Also, need to figure out how to set crosshair color.
So what do you need now? More SVG files for the rest of the icons? I am not a developer, so just give me a simple task.
::bitacovir::
===================================
One must be absolutely modern.
Arthur Rimbaud (A Season in Hell -1873)

My personal web site
My GitHub repository
My old Blog
Mini Airflow Tunnel Project
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 » Mon Jul 27, 2020 1:14 pm

vanuan wrote:
Mon Jul 27, 2020 9:06 am
I think Mike intentionally doesn't want any metadata which isn't used in the production app. Add several kilobytes to each svg and you've got several megabytes of wasted space.
Exactly! I presume with svg based cursors the cursors are being created fomr the svg when the workbench is first opened. During this operation, each svg will be opened, parsed and the cursor built. The smaller and more precise the svg file, the quicker it'll work: FreeCAD will appear more responsive. (I also want to optimise all the button icon svgs)
vanuan wrote:
Mon Jul 27, 2020 9:06 am
I think ideally, there should be some script/cmake step which "cleans" svg files. But that's totally unrelated to this PR. So maybe we can simply add a LICENSE file to the folder and list all credits there.
Unfortunately, some of the contents of these SVGs is very complex. On inspection, most of the current SVGs contain multiple gradient definitions that are totally unused. Graphical objects are drawn in one place, then moved, sometimes more than once.

SVGs are a little hobby for me. I've cleaned up the FreeCAD logo - and added a twist. Drop the attached file in a browser to see! (Maybe we could use it on the website?)
Attachments
FreeCAD_twist.svg
(2.49 KiB) Downloaded 10 times
User avatar
vanuan
Posts: 179
Joined: Wed Oct 24, 2018 9:49 pm

Re: Custom cursors and high dpi

Postby vanuan » Mon Jul 27, 2020 1:15 pm

bitacovir wrote:
Mon Jul 27, 2020 12:28 pm
So what do you need now? More SVG files for the rest of the icons? I am not a developer, so just give me a simple task.
Now, I need somebody to review the code and hopefully merge it. Then a daily build should be released so that users would test and report remaining issues if any.

Created a separate thread to discuss the code https://forum.freecadweb.org/viewtopic.php?f=17&t=49012
vocx
Posts: 4637
Joined: Thu Oct 18, 2018 9:18 pm

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

Postby vocx » Mon Jul 27, 2020 3:29 pm

jmaustpc wrote:
Mon Jul 27, 2020 12:41 am
...
Secondly Mike, I have not looked but have you included an appropriate licence within the SVG file?
This is in general not needed. All code in FreeCAD is implicitly either LGPL2, or Creative Commons 3.0 for the artwork.
Always add the important information to your posts if you need help.
To support the documentation effort, and code development, your donation is appreciated: paypal.
vocx
Posts: 4637
Joined: Thu Oct 18, 2018 9:18 pm

Re: Custom cursors and high dpi

Postby vocx » Mon Jul 27, 2020 3:31 pm

vanuan wrote:
Mon Jul 27, 2020 1:15 pm
Now, I need somebody to review the code and hopefully merge it...
By the way, don't despair. This is how FreeCAD works. Occasionally it takes weeks and months for pull requests to be merged. So just sit tight and enjoy the ride.

(A lot of active forum users are in fact non-programmers so they can't do much anyway.)
Always add the important information to your posts if you need help.
To support the documentation effort, and code development, your donation is appreciated: paypal.
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 » Mon Jul 27, 2020 3:45 pm

vocx wrote:
Mon Jul 27, 2020 3:29 pm
This is in general not needed. All code in FreeCAD is implicitly either LGPL2, or Creative Commons 3.0 for the artwork.
Excellent. Thanks for clarifying!
vocx
Posts: 4637
Joined: Thu Oct 18, 2018 9:18 pm

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

Postby vocx » Mon Jul 27, 2020 3:59 pm

mikeprice99 wrote:
Mon Jul 27, 2020 1:14 pm
...(I also want to optimise all the button icon svgs)...
If you want to improve the SVG icons, go ahead; I think they definitely could use some work. For example, they should all be Plain SVG and have a native resolution of 96 dpi.

And yes, many icons have many strange things inside, unused gradients and things like that. I suspect this is due to historical reasons; agryson was responsible for creating the new set of icons sometime around the development of v0.16. See Artwork Guidelines, and Artwork.

However, since that time more people have joined the coding effort and programmers, not artists, have added new icons by essentially copying and modifying older ones; so I think at this point many icons could use a cleanup.
Always add the important information to your posts if you need help.
To support the documentation effort, and code development, your donation is appreciated: paypal.