Hi all,
To help font designers, I just added new functionality to the node tool. It adds a node at the extreme values of a path, if there is not already a node there. (because of a bug in 2geom, it does not work for some special cases, we are working on it)
At the moment, this new feature adds 4 buttons to the node tool. Way too much of course. The plan is to move them into a submenu of the Add nodes button. This should not be too hard, the first step is to rewrite in /src/widget/toolbox.cpp:
" <toolitem action='NodeInsertAction' />" " <toolitem action='NodeInsertActionMinX' />" " <toolitem action='NodeInsertActionMaxX' />" " <toolitem action='NodeInsertActionMinY' />" " <toolitem action='NodeInsertActionMaxY' />"
to
" <toolitem action='NodeInsertAction'>" " <menu action='NodeInsertActionMenu'>" " <menuitem action='NodeInsertActionMinX' />" " <menuitem action='NodeInsertActionMaxX' />" " <menuitem action='NodeInsertActionMinY' />" " <menuitem action='NodeInsertActionMaxY' />" " </menu>" " </toolitem>"
or so I learn from a gtk demo [1]. It uses a new GtkMenuToolButton [2]. But, alas, if you rewrite it, you get GTK errors and Inkscape terminates...
I hope someone can find the time and spirit to work on this. Thanks!
Cheers, Johan
[1] http://git.gnome.org/browse/gtk+/tree/demos/gtk-demo/appwindow.c?id=2.24.8 [2] http://developer.gnome.org/gtk/2.24/GtkMenuToolButton.html
2012/1/4 Johan Engelen <jbc.engelen@...2592...>:
" <toolitem action='NodeInsertAction'>" " <menu action='NodeInsertActionMenu'>" " <menuitem action='NodeInsertActionMinX' />" " <menuitem action='NodeInsertActionMaxX' />" " <menuitem action='NodeInsertActionMinY' />" " <menuitem action='NodeInsertActionMaxY' />" " </menu>" " </toolitem>"
or so I learn from a gtk demo [1]. It uses a new GtkMenuToolButton [2]. But, alas, if you rewrite it, you get GTK errors and Inkscape terminates...
Here is an example. http://www.gtkforums.com/viewtopic.php?t=4215
Basically you need to derive a new type from GtkAction and set the toolbar_item_type member of GtkActionClass to GTK_TYPE_MENU_TOOL_BUTTON. I'm not sure whether you can do this at all from gtkmm.
Regards, Krzysztof
On 5-1-2012 1:01, Krzysztof Kosiński wrote:
2012/1/4 Johan Engelen<jbc.engelen@...2592...>:
"<toolitem action='NodeInsertAction'>" "<menu action='NodeInsertActionMenu'>" "<menuitem action='NodeInsertActionMinX' />" "<menuitem action='NodeInsertActionMaxX' />" "<menuitem action='NodeInsertActionMinY' />" "<menuitem action='NodeInsertActionMaxY' />" "</menu>" "</toolitem>"
or so I learn from a gtk demo [1]. It uses a new GtkMenuToolButton [2]. But, alas, if you rewrite it, you get GTK errors and Inkscape terminates...
Here is an example. http://www.gtkforums.com/viewtopic.php?t=4215
Basically you need to derive a new type from GtkAction and set the toolbar_item_type member of GtkActionClass to GTK_TYPE_MENU_TOOL_BUTTON. I'm not sure whether you can do this at all from gtkmm.
Great, thanks for the link. It works now. But the result is disappointing...
Ciao, Johan
Hi all, Some icons are not rendered in dropdown/fly-out/pop-up menu's. For example the 4 items in the dropdown menu next to the "+" button in the node tool. Also when the toolbar is longer than Inkscape's window, many icons are not rendered in the dropdown menu that shows the buttons that have 'fallen off'.
I could not find out what the problem is :-(
Ciao, Johan
participants (2)
-
Johan Engelen
-
Krzysztof Kosiński