Re: [Inkscape-devel] Corel DRAW-like Snapping
Op Ma, 16 februari, 2009 01:47, schreef Krzysztof KosiÅski:
Diederik van Lierop wrote:
Already implemented. Please select "only snap the node closest ..." in the prefs.
This is great! Why isn't it on the snapping toolbar though? I didn't find it at first because I assumed that most of the snapping options will be on the
I didn't want to put everything in the toolbar, because that would be way too much. Currently only the per-document snapping options are in the snap toolbar, and the prefs are not. Maybe we could just add a button to quickly open the preferences dialog, defaulting to the snapping tab? That would make them more easy to discover.
toolbar. Also of note is that the snapping options from the toolbar are not present in the prefs dialog - not very intuitive if e.g. someone disables the toolbar to conserve screen space like I do.
They used to be available in the document properties dialog, but it was difficult not make a mess of it using only checkboxes. Now we've got icons, we could use these in the document properties dialog too, but I do not like duplicating functionality (and code) unless really badly needed.
Another thing is that the visualization of the snapping isn't best - while hovering over e.g. a rectangle, there is no indication of which node will snap when I drag the rectangle - it only appears when I start dragging, and it isn't clear what this little circle means.
We could indeed use some better graphics here, I just chose one from stock. The cross (displayed after snapping) is not very noticeable either.
The best thing to do would be to display text over the node that will snap (e.g. "corner", "midpoint", etc.) while the user hovers the select tool over the selected shape, and a similar text when
I think text would be a bit too intrusive, but it would indeed be useful to display what will snap in advance.
However, those are just small usability glitches. Again, thanks for this incredible feature!
Thanks. You're welcome!
Regards,
Diederik
Diederik van Lierop wrote:
I didn't want to put everything in the toolbar, because that would be way too much. Currently only the per-document snapping options are in the snap toolbar, and the prefs are not. Maybe we could just add a button to quickly open the preferences dialog, defaulting to the snapping tab? That would make them more easy to discover.
Hm, now I understand. Having the snapping prefs partially in the document and partially in the prefs is kind of messy. I think the "snap node nearest to cursor" could also be a per-document setting.
They used to be available in the document properties dialog, but it was difficult not make a mess of it using only checkboxes. Now we've got icons, we could use these in the document properties dialog too, but I do not like duplicating functionality (and code) unless really badly needed.
I think this could be taken care of using ToggleActions, which would avoid duplicating most of the code.
We could indeed use some better graphics here, I just chose one from stock. The cross (displayed after snapping) is not very noticeable either.
We could at least make the cross red, like the outline.
Also I noticed that you added tooltips that pop up when snapping - this is a very good idea, but there's some lag before they are displayed, and sometimes they aren't displayed at all. I hope there's some way to make them instantaneous.
Regards, Krzysztof Kosiński
Hi Krzysztof,
Also I noticed that you added tooltips that pop up when snapping - this is a very good idea, but there's some lag before they are displayed, and sometimes they aren't displayed at all. I hope there's some way to make them instantaneous.
You wouldn't believe how much time I already spend on getting these tooltips to show at all :-(. It still doesn't always show for some reason, and apparently it can crash Inkscape (which is probably due to the custom events I have to emit to trigger the tooltip). I'm about to dump the GtkTooltip and just create our own tooltip window manually. This should be much more reliable, and then we can also have it shown and hidden in sync with the snap indicator.
Diederik
Diederik van Lierop wrote:
I'm about to dump the GtkTooltip and just create our own tooltip window manually. This should be much more reliable, and then we can also have it shown and hidden in sync with the snap indicator.
How about drawing the text on the canvas in a similar way to how the path outline is drawn?
Regards, Krzysztof Kosiński
One more thought: use gtk_tooltip_trigger_tooltip_query when the tooltip should be displayed (e.g. we snapped). This should be instantaneous. However, I heard that it can cause other issues. http://library.gnome.org/devel/gtk/stable/GtkTooltip.html#gtk-tooltip-trigge...
Regards, Krzysztof Kosiński
On 02/21/2009 02:01 AM, Krzysztof Kosiński wrote:
One more thought: use gtk_tooltip_trigger_tooltip_query when the tooltip should be displayed (e.g. we snapped). This should be instantaneous.
That's exactly what I tried first, but it kept showing up at (0,0), i.e. in the upper left corner of the screen. I've debug-stepped into the Gtk sources, but I couldn't find where things went wrong.
However, I heard that it can cause other issues.
Do you have any more detail on this? Any references?
Diederik
On Fri, Feb 20, 2009 at 7:41 PM, Krzysztof Kosiński <tweenk.pl@...400...> wrote:
Diederik van Lierop wrote:
I'm about to dump the GtkTooltip and just create our own tooltip window manually. This should be much more reliable, and then we can also have it shown and hidden in sync with the snap indicator.
How about drawing the text on the canvas in a similar way to how the path outline is drawn?
Yes - this is definitely what is needed here. Max has added a SPCanvasText canvas item, that's what needs to be used here with a timeout, no need to create any new windows or tooltips that are so unreliable and clumsy.
Diederik van Lierop wrote:
Do you have any more detail on this? Any references? Diederik
Just more of the same woes you have encountered: http://mail.gnome.org/archives/gtk-perl-list/2008-April/msg00020.html
I think displaying the text on the canvas will be more consistent. Regards, Krzysztof Kosiński
On 02/21/2009 04:13 PM, Krzysztof Kosiński wrote:
Just more of the same woes you have encountered:
http://mail.gnome.org/archives/gtk-perl-list/2008-April/msg00020.html
Thanks. Somehow I find this very soothing ;-)
Diederik
participants (3)
-
bulia byak
-
Diederik van Lierop
-
Krzysztof Kosiński