mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-05-29 21:30:18 +02:00
Apply suggestions from code review
Co-authored-by: TheKodeToad <TheKodeToad@proton.me> Signed-off-by: Alexandru Ionut Tripon <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
6a2f5f071c
commit
12a4915420
@ -23,7 +23,7 @@
|
|||||||
#include "FileSystem.h"
|
#include "FileSystem.h"
|
||||||
#include "Json.h"
|
#include "Json.h"
|
||||||
|
|
||||||
QImage improveSkin(const QImage& skin)
|
static QImage improveSkin(const QImage& skin)
|
||||||
{
|
{
|
||||||
if (skin.size() == QSize(64, 32)) { // old format
|
if (skin.size() == QSize(64, 32)) { // old format
|
||||||
QImage newSkin = QImage(QSize(64, 64), skin.format());
|
QImage newSkin = QImage(QSize(64, 64), skin.format());
|
||||||
@ -40,12 +40,12 @@ QImage improveSkin(const QImage& skin)
|
|||||||
}
|
}
|
||||||
return skin;
|
return skin;
|
||||||
}
|
}
|
||||||
QImage getSkin(const QString path)
|
static QImage getSkin(const QString path)
|
||||||
{
|
{
|
||||||
return improveSkin(QImage(path));
|
return improveSkin(QImage(path));
|
||||||
}
|
}
|
||||||
|
|
||||||
QImage generatePreviews(QImage texture, bool slim)
|
static QImage generatePreviews(QImage texture, bool slim)
|
||||||
{
|
{
|
||||||
QImage preview(36, 36, QImage::Format_ARGB32);
|
QImage preview(36, 36, QImage::Format_ARGB32);
|
||||||
preview.fill(Qt::transparent);
|
preview.fill(Qt::transparent);
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
#include <QOpenGLBuffer>
|
#include <QOpenGLBuffer>
|
||||||
#include <QVector2D>
|
#include <QVector2D>
|
||||||
#include <QVector3D>
|
#include <QVector3D>
|
||||||
|
#include <QtMath>
|
||||||
|
|
||||||
#include "minecraft/skins/SkinModel.h"
|
#include "minecraft/skins/SkinModel.h"
|
||||||
#include "rainbow.h"
|
#include "rainbow.h"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user