Adding UI components to Style Dialog

The list of UI components to be added to the style dialog include:

  • A treeView to display the list of selectors.
  • A button to add a new selector to the list of selectors
  • A button to delete selector from the selectors’ list

The buttons have been added to a HBox _buttonBox which is further contained in a bigger VBox _mainbox in the dialog. The _mainBox contains both the treeview and the HBox containing the two buttons to add and delete selectors. Currently, I have disabled the delete button, keeping my focus on functionality to add selector.

Lack of documentation of gtkmm was not very helpful. I faced some issues which I was unable to solve initially. Since Inkscape is migrating to Gtk+ 3, so I developed the UI components using Gtk+ instead of gtkmm. But the long term goal of Inkscape’s development cycle involves migrating to gtkmm completely, so as guided by mentor Tavmjong Bah, I moved back to gtkmm.

Some of the issues I confronted include:

  1. Button size expanded as I changed the size of the dialog. In the correct case, it should have remained standard. Using the appropriate flag from the enum Gtk::PackOptions, I was able to fix it.
  2. On adding the treeview to the dialog, empty space appeared at the top in the widget. Using the pack_start() function with appropriate packing options, all options available, this is not fixed yet.

Screenshot from 2016-06-04 22:13:55

Leave a Reply