bwmilby / SvgIconTool

#LiveCode tool to manage SVG Icon Families
MIT License
3 stars 3 forks source link

use com.livecode.widget.iconpicker #1

Open macMikey opened 1 year ago

macMikey commented 1 year ago

are you opposed to switching the view to the iconpicker widget?

bwmilby commented 1 year ago

Honestly, I have not even looked at it. I don't think it was available when I initially wrote it. I'll take a look.

bwmilby commented 1 year ago

I'll need to look a bit more, but my initial thoughts aren't all that great. The one built into the inspector can't resize and the thumb to scroll seems flaky. Keyboard navigation is not enabled and I'm not sure how you would use it to select multiple icons. The filter is very handy though.

macMikey commented 1 year ago

the reason for using the picker widget is to get rid of the need to do the left-right keyboard navigation, but you're right, the other shortcomings are not great. there's another shortcoming, because in some circumstances, the widget does not hilite the selected icon, either. the filter is something that can be added to your project, especially if the search goes across families, and if it is possible to merge multiple families into one view (e.g. all the icons in a stack/project). lc's icon widget search is only for the current family.

bwmilby commented 1 year ago

The current UI doesn't have a merge command, but it is pretty easy to do. If you use the star to select all and copy to a new family and do that for each existing family (using the same new family name) you end up with a combined list. In this case, adding the family name on copy would be especially helpful. When implementing search, having an "all" option would be something I'd consider.

macMikey commented 1 year ago

i was looking at the ui stack when i was messing with the behaviors, but i think that might be something that you will be far better at than me. i was also looking at the polylist widget (there's an svg stack example included with it). that would make some of the ui maintenance issues simpler to manage, but not everyone is going to have the polylist, so the only way to use it and make the tool available to everyone would be to include it in a new compiled widget stack so that it could be distributed.

bwmilby commented 1 year ago

Distributing with Polylist is something that I've been thinking about. If I compiled the stack into an app, I don't know how I would be able to plug into the IDE instance of the engine. It would be useful for building your families and viewing icons but would not be able to directly load and set the current family (at least I'm not sure how I would do it for Linux & Windows, could use AppleScript on Mac).

This stack was one of my early ones where I used the Geometry Manager along with some custom code in the resizeStack handler. The GM was one of the areas that I worked on quite a bit early. I pushed to make it available on mobile. Really the new ResponsiveLayout library would take care of the icon grid much easier than what I did. Since I've already done the math, it probably isn't worth changing.

bwmilby commented 1 year ago

Just loaded the SVG example stack... if you move an icon set into the library and make it the active family and then press the populate list button on the example, you see the new family.