aarnt/octopi — pull request #21 by gcala (2014-03-29 15:42:31+00:00)
Title: Use theme icons when possible

Hi Alexander, I'm Giuseppe Calà from Chakra Team. I'm working to backport upstream some of the changes we used. This first pull request regards theme icons support. I replaced most of "return QIcon(...);" with "return QIcon::fromTheme(...);" that tries to use a theme icon and fallback to use octopi own icons when necessary. The current look on chakra is the following:

http://wstaw.org/m/2014/03/29/octopi_theme_icons.png

As you can see I untouched icons in packages view.

I also created additional helper functions to change QActions' icons (maybe their number can be reduced creating a generic, f.i., getIconCollapse(...) instead of getIconCollapseItem() and getIconCollapseAllItems()). I was pedantic to clarify the corresponding QAction.

The last modification regarded SearchLineEdit where I replaced QToolButton with a simple QPushButton and annulled stylesheet customization for it (again, to let me use theme icons). And slightly modified SearchLineEdit::resizeEvent() to center vertically the button. The look and feel seems ok imo.

My main concern is the following: the code, as it is now, uses theme icons also with gnome or any other gtk DE. Is it ok for you? Or this must regard only kde? In the latter case I can use your WMHelper::isKDERunning() to leave a vanilla gtk look.

Regards,
Giuseppe