GSoC 2019: Week 6 - Icons for the Palette Elements.

Posted 1 year ago

Works Planned To Do:

As mentioned in the last week's blog post, I wanted to set icons for the palette elements. To do this I had to understand how the icons for the elements were drawn, so most of the time I had to learn how the pre-existing code worked.

Work Done:

Completed setting the icons for the Palette Elements:

I started by creating a QPixmap by using a QPainter and also reimplemented the Palette::pixmap() function for making drawing the new icons for the Palette Elements. The icons generated were then passed to the read() function to display it on the ListWidgetItem.


Fixed the layout issue of the expanded QListWidget.

When a palette was expanded the QListWidget showed a wrong size of the expanded Widget, i.e. it either overlapped over the other palettes or showed a gap between one palette to another. This was fixed by overriding the showEvent() function.

Work planned to do next week:

Reimplement the keyboard navigation
This week I wanted to allow users to use the keyboard to navigate through the palette Elements uniformly. The palette elements can be navigated using the up and down arrows by reimplementing the keyPressEvent() function. This will allow one to go through a grid of palette icons uniformly.