mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-07-07 05:46:58 +03:00
Add dark, light, blue and colored theme from pe.
Replaces the old dark and light themes
This commit is contained in:
parent
92560bf0cd
commit
8f7aec032b
168 changed files with 4405 additions and 1902 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue