Sketcher icons (finally) aligned

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

Moderator: agryson

User avatar
agryson
Posts: 443
Joined: Wed Nov 23, 2016 8:30 am
Location: Paris, France
Contact:

Re: Sketcher icons (finally) aligned

Postby agryson » Sun Feb 05, 2017 11:17 am

NormandC wrote:@agryson
I think removing the triangles and thinning the outlines to the same width as the Draft object icon would be perfect.
Works for me, I'll include that change in the next vulture pass. (Should be in a week/ten days)

Edit: Actually, I'd already played around with that idea in a branch, so went much quicker than expected. Changes have just been merged upstream, you should see the updates in your next build.
abdullah
Posts: 1502
Joined: Sun May 04, 2014 3:16 pm

Re: Sketcher icons (finally) aligned

Postby abdullah » Tue Feb 07, 2017 9:11 pm

Nice work with the icons.

A list of icons claimed by code in alphabetic order is this:

Code: Select all

Constraint_Ellipse_Axis_Angle
Constraint_Ellipse_Major_Radius
Constraint_Ellipse_Minor_Radius
Constraint_EqualLength
Constraint_Horizontal
Constraint_HorizontalDistance
Constraint_HorizontalDistance_Driven
Constraint_InternalAlignment
Constraint_InternalAlignment_Ellipse_Focus1
Constraint_InternalAlignment_Ellipse_Focus2
Constraint_InternalAlignment_Ellipse_MajorAxis
Constraint_InternalAlignment_Ellipse_MinorAxis
Constraint_InternalAngle
Constraint_InternalAngle_Driven
Constraint_Length
Constraint_Length_Driven
Constraint_Parallel
Constraint_Perpendicular
Constraint_PointOnObject
Constraint_PointOnPoint
Constraint_Radius
Constraint_Radius_Driven
Constraint_SnellsLaw
Constraint_SnellsLaw_Driven
Constraint_Symmetric
Constraint_Tangent
Constraint_Vertical
Constraint_VerticalDistance
Constraint_VerticalDistance_Driven
document-new
:/icons/bound-expression.svg
Sketcher_AlterConstruction
Sketcher_Clone
Sketcher_CloseShape
Sketcher_Conics
Sketcher_Conics_Ellipse_Center
Sketcher_ConnectLines
Sketcher_ConstrainLock
Sketcher_ConstrainLock_Driven
Sketcher_Copy
Sketcher_Create3PointArc
Sketcher_Create3PointArc_Constr
Sketcher_Create3PointCircle
Sketcher_Create3PointCircle_Constr
Sketcher_CreateArc
Sketcher_CreateArc_Constr
Sketcher_CreateBSpline
Sketcher_CreateBSpline_Constr
Sketcher_CreateCircle
Sketcher_CreateCircle_Constr
Sketcher_CreateEllipse
Sketcher_CreateEllipse_3points
Sketcher_CreateEllipse_3points_Constr
Sketcher_CreateEllipse_Constr
Sketcher_CreateFillet
Sketcher_CreateHeptagon
Sketcher_CreateHeptagon_Constr
Sketcher_CreateHexagon
Sketcher_CreateHexagon_Constr
Sketcher_CreateLine
Sketcher_CreateLine_Constr
Sketcher_CreateOctagon
Sketcher_CreateOctagon_Constr
Sketcher_CreatePentagon
Sketcher_CreatePentagon_Constr
Sketcher_Create_Periodic_BSpline
Sketcher_Create_Periodic_BSpline_Constr
Sketcher_CreatePoint
Sketcher_CreatePolyline
Sketcher_CreatePolyline_Constr
Sketcher_CreateRectangle
Sketcher_CreateRectangle_Constr
Sketcher_CreateSlot
Sketcher_CreateSlot_Constr
Sketcher_CreateSquare
Sketcher_CreateSquare_Constr
Sketcher_CreateText
Sketcher_CreateTriangle
Sketcher_CreateTriangle_Constr
Sketcher_DraftLine
Sketcher_EditSketch
Sketcher_Element_Arc_Edge
Sketcher_Element_Arc_EndPoint
Sketcher_Element_Arc_MidPoint
Sketcher_Element_Arc_StartingPoint
Sketcher_Element_BSpline_Edge
Sketcher_Element_BSpline_EndPoint
Sketcher_Element_BSpline_StartPoint
Sketcher_Element_Circle_Edge
Sketcher_Element_Circle_MidPoint
Sketcher_Element_Ellipse_All
Sketcher_Element_Ellipse_CentrePoint
Sketcher_Element_Ellipse_Edge_2
Sketcher_Element_Elliptical_Arc_Centre_Point
Sketcher_Element_Elliptical_Arc_Edge
Sketcher_Element_Elliptical_Arc_End_Point
Sketcher_Element_Elliptical_Arc_Start_Point
Sketcher_Element_Hyperbolic_Arc_Centre_Point
Sketcher_Element_Hyperbolic_Arc_Edge
Sketcher_Element_Hyperbolic_Arc_End_Point
Sketcher_Element_Hyperbolic_Arc_Start_Point
Sketcher_Element_Line_Edge
Sketcher_Element_Line_EndPoint
Sketcher_Element_Line_StartingPoint
Sketcher_Element_Parabolic_Arc_Centre_Point
Sketcher_Element_Parabolic_Arc_Edge
Sketcher_Element_Parabolic_Arc_End_Point
Sketcher_Element_Parabolic_Arc_Start_Point
Sketcher_Element_Point_StartingPoint
Sketcher_Element_SelectionTypeInvalid
Sketcher_Elliptical_Arc
Sketcher_Elliptical_Arc_Constr
Sketcher_External
Sketcher_Hyperbolic_Arc
Sketcher_Hyperbolic_Arc_Constr
Sketcher_LeaveSketch
Sketcher_MapSketch
Sketcher_MergeSketch
Sketcher_MirrorSketch
Sketcher_NewSketch
Sketcher_Parabolic_Arc
Sketcher_Parabolic_Arc_Constr
Sketcher_RectangularArray
Sketcher_SelectConflictingConstraints
Sketcher_SelectConstraints
Sketcher_SelectElementsAssociatedWithConstraints
Sketcher_SelectHorizontalAxis
Sketcher_SelectOrigin
Sketcher_SelectRedundantConstraints
Sketcher_SelectVerticalAxis
Sketcher_Sketch
Sketcher_Symmetry
Sketcher_ToggleConstraint
Sketcher_Trimming
Sketcher_ViewSketch


I have done it with linux terminal:

Code: Select all

grep -i pixmap * | awk -F'\"' '{ print $2 }' | awk '!seen[$0]++' | sort


I can not claim it is complete (probably some detected are in code that is commented out and thus unused and maybe some are not detected by the expression), but it should give a good indication of what can be deleted and what can not.

...and maybe somebody knows better and provides a better solution :) ...
User avatar
NormandC
Posts: 12077
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Sketcher icons (finally) aligned

Postby NormandC » Wed Feb 08, 2017 3:17 am

agryson wrote:Edit: Actually, I'd already played around with that idea in a branch, so went much quicker than expected. Changes have just been merged upstream, you should see the updates in your next build.

Great! It's more "streamlined" now, I like it.

I'm sorry though, you forgot to change two :D

Sketcher_MapSketch.svg
Sketcher_ViewSketch.svg

I think they are low priority.

Thanks!
User avatar
agryson
Posts: 443
Joined: Wed Nov 23, 2016 8:30 am
Location: Paris, France
Contact:

Re: Sketcher icons (finally) aligned

Postby agryson » Wed Feb 08, 2017 7:11 am

NormandC wrote:I'm sorry though, you forgot to change two :D
Ah ! Nice spot, I'll catch them in the next round.
abdullah
Posts: 1502
Joined: Sun May 04, 2014 3:16 pm

Re: Sketcher icons (finally) aligned

Postby abdullah » Wed Feb 08, 2017 11:32 am

I do not know if this is the right place to ask for some icons. I just will try.

I need two icons for sketcher BSpline Information Layer support. The button is of "toggable" type, so it shows one icon when ON and another when OFF.

When ON a BSpline is shown with the control polygon:

polygon_on.png
polygon_on.png (8.71 KiB) Viewed 207 times


when OFF, it is not:

polygon_off.png
polygon_off.png (7.51 KiB) Viewed 207 times


P.S.: Note that in the number, showing the degree of the bspline is independent of the control polygon. It can happen, that the degree is shown and the control polygon it is not.

Thanks!
abdullah
User avatar
agryson
Posts: 443
Joined: Wed Nov 23, 2016 8:30 am
Location: Paris, France
Contact:

Re: Sketcher icons (finally) aligned

Postby agryson » Wed Feb 08, 2017 11:38 am

Sure, I'll have a look at it and can push the changes @NormandC mentioned with it. I'll try to have a sample for you by this weekend.
abdullah
Posts: 1502
Joined: Sun May 04, 2014 3:16 pm

Re: Sketcher icons (finally) aligned

Postby abdullah » Wed Feb 08, 2017 2:28 pm

agryson wrote:Sure, I'll have a look at it and can push the changes @NormandC mentioned with it. I'll try to have a sample for you by this weekend.


Thank you so much!
User avatar
agryson
Posts: 443
Joined: Wed Nov 23, 2016 8:30 am
Location: Paris, France
Contact:

Re: Sketcher icons (finally) aligned

Postby agryson » Wed Feb 08, 2017 7:45 pm

abdullah wrote:Thank you so much!
No worries, how's this:
spritesheet.png
spritesheet.png (22.66 KiB) Viewed 180 times


As its a toggle, you should implement it using a QToolButton as discussed here. That way you use a single icon and get the toggle behaviour baked in.

Edit: If you're ok with this, I'll request a pull to master directly with @NormandC's feedback. You can then implement at your leisure. Icon is currently called Sketcher_Toggle_BSpline_Information.svg - but if you prefer it be called something else just let me know and I'll edit before submitting the pull request.
abdullah
Posts: 1502
Joined: Sun May 04, 2014 3:16 pm

Re: Sketcher icons (finally) aligned

Postby abdullah » Wed Feb 08, 2017 10:30 pm

agryson wrote:No worries, how's this:


Looks great.

agryson wrote:As its a toggle, you should implement it using a QToolButton as discussed here. That way you use a single icon and get the toggle behaviour baked in.


Yes, I should. I will look into it. ;)

agryson wrote:Edit: If you're ok with this, I'll request a pull to master directly with @NormandC's feedback. You can then implement at your leisure. Icon is currently called Sketcher_Toggle_BSpline_Information.svg - but if you prefer it be called something else just let me know and I'll edit before submitting the pull request.


If you do not mind, hold it a little bit, as I have to look into the toggle implementation, so as to make sure that I can use it.

In the meanwhile, if I could abuse your talent... I would need a second icon for making appear and disappear the curvature comb:

comb_on.png
comb_on.png (19.16 KiB) Viewed 167 times


it is a toggle button as the previous one.

Then, if could even abuse a little bit more, then I would ask for another icon to show/hide the number that appears in the bspline (the degree).

I am asking a lot :oops: , so feel free to say no :)
User avatar
agryson
Posts: 443
Joined: Wed Nov 23, 2016 8:30 am
Location: Paris, France
Contact:

Re: Sketcher icons (finally) aligned

Postby agryson » Thu Feb 09, 2017 5:18 am

abdullah wrote:I would need a second icon for making appear and disappear the curvature comb:

... then I would ask for another icon to show/hide the number that appears in the bspline (the degree).

I am asking a lot :oops: , so feel free to say no :)
No... Worries!

But that will really be the weekend then. I like to avoid text in icons so will try to use an abstract reference, like a # for numbers.