Another Change

Click ‘+’ at the bottom, a new selector and a new style element. So each selector was added to a new style element. The change is a single style element should be there for each file and thus it can have multiple selectors. Both the earlier version and new implementation are shown below: Setting the … Read More

Class Attribute Also Set

And class attribute is also back. Initially, when I started with addition of a style selector, I was adding the selector names to class attribute of the selected object. Whether it was the object’s id or a class name, both went to class attribute’s value. But since style element is the focus, that work was … Read More

Passing a test

Getting a test file from Tavmjong Bah, which my code didn’t pass, I made a few changes in my code. First issue was the map containing keys and values of selectors returned empty keys. So the parsing of the style element had to be changed. Using the delimiters { and }, I fixed the issue … Read More

Just deletion from treeview

Moving on from adding a selector to the style dialog, my next step is to delete a selector from the selector as well as from the XML representation of the document. Following the approach to get the selection from the treeview, get_selection() is used to obtain the selected row which is then iterated using get_selected(). … Read More

Style Dialog Populated with Classes & IDs

Today I added classes and ids to style dialog distinguished by characters ‘#’ and ‘.’ respectively. If the selector name is the object’s id, it is added to the dialog as #object-id. If the user wishes to add a class as a selector, it is added to the dialog as .red. Another implementation I did … Read More

A Step Back & Ahead

Well adding selector to class seemed pretty easy, eh? I was feeling pretty accomplished unless I became aware I am heading not towards the target. Yesterday morning, I was told that selector was not to be added to the class attribute and rather to style attribute to the object. And this messy head confused style … Read More

Setting text of entry box

The text in the entry box (the one in the dialog that opens up on clicking ‘+’ at the bottom of style dialog) determines the value of ‘class’ attribute of an object. A default text value shows up in the dialog box if no object is selected in the drawing. In case, one object is … Read More

A dialog box opens on ‘+’

First thing being adding a selector to the treeview by clicking on ‘+’ at the bottom, the signal emitted by clicking the button was connected to a function, its so called slot. Clicking this button now opens up a dialog box which contains an entry box in it. Entry box is a single line text … Read More

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 … Read More

Registering Style Dialog

For enhancing CSS support in Inkscape, a Style Dialog is being developed for selection of different objects on the basis of their various style attributes. Initiating with the creation of the Style Dialog, the first step was to register the new dialog in the application. Verbs (generally called commands) are added to verbs.h in the … Read More
Follow

Get notified with the latest posts

Plugin Supporter WordPress Post Navigation
%d bloggers like this: