Add dark, light, blue and colored theme from pe.

Replaces the old dark and light themes
This commit is contained in:
Petr Mrázek
2014-10-26 23:44:20 +01:00
parent 92560bf0cd
commit 8f7aec032b
168 changed files with 4405 additions and 1902 deletions

View File

@ -26,5 +26,18 @@ void IconLabel::setIcon(QIcon icon)
void IconLabel::paintEvent(QPaintEvent *)
{
QPainter p(this);
m_icon.paint(&p, contentsRect());
QRect rect = contentsRect();
int width = rect.width();
int height = rect.height();
if(width < height)
{
rect.setHeight(width);
rect.translate(0, (height - width) / 2);
}
else if (width > height)
{
rect.setWidth(height);
rect.translate((width - height) / 2, 0);
}
m_icon.paint(&p, rect);
}