Skip to content
Permalink
Browse files

Use simplified Mumble logo for small icons

* Adjusted the script which creates the icon file to use the simplified svg for smaller sizes
  • Loading branch information...
Kissaki committed Jun 15, 2013
1 parent 54e74c1 commit 8dc58ef94ced2f8edfdc042a2f6dd437388475b4
Showing with 27 additions and 3 deletions.
  1. +27 −3 src/tests/IconSync.cpp
@@ -18,17 +18,40 @@ int main(int argc, char **argv) {
svg.render(&painter);

QList<int> sizes;
sizes << 16;
sizes << 24;
sizes << 32;
sizes << 48;
sizes << 64;
sizes << 96;
sizes << 128;
sizes << 256;


QSvgRenderer svgSmall(QLatin1String("../../icons/mumble_small.svg"));
QImage originalSmall(512,512,QImage::Format_ARGB32);
originalSmall.fill(Qt::transparent);

QPainter painterSmall(&originalSmall);
painterSmall.setRenderHint(QPainter::Antialiasing);
painterSmall.setRenderHint(QPainter::TextAntialiasing);
painterSmall.setRenderHint(QPainter::SmoothPixmapTransform);
painterSmall.setRenderHint(QPainter::HighQualityAntialiasing);
svgSmall.render(&painterSmall);

QList<int> sizesSmall;
sizesSmall << 16;
sizesSmall << 24;


QStringList qslImages;
foreach(int size, sizesSmall) {
QImage img = originalSmall.scaled(size,size,Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
QString png = QDir::temp().absoluteFilePath(QString::fromLatin1("mumble.%1.png").arg(size));

QImageWriter qiw(png);
qiw.write(img);

qslImages << png;
}
foreach(int size, sizes) {
QImage img = original.scaled(size,size,Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
QString png = QDir::temp().absoluteFilePath(QString::fromLatin1("mumble.%1.png").arg(size));
@@ -38,8 +61,9 @@ int main(int argc, char **argv) {

qslImages << png;
}
QStringList args;


QStringList args;
args << qslImages;
args << QDir::current().absoluteFilePath("../../icons/mumble.ico");

0 comments on commit 8dc58ef

Please sign in to comment.
You can’t perform that action at this time.