Better shuffle/repeat icons
2
README
@@ -775,6 +775,8 @@ The Cantata source folder contains the following structure:
|
||||
widgets - Widgets that are probably Cantata specific.
|
||||
windows - Files specfic to Windows builds..
|
||||
mac - Files specfic to MacOSX builds.
|
||||
freecns/ - Repeat and Shuffle icons
|
||||
cumulus https://www.iconfinder.com/iconsets/freecns-cumulus
|
||||
|
||||
Cantata's SVG icons have been 'cleaned' using:
|
||||
scour --strip-xml-prolog --indent=none -i in.svg -o out.svg
|
||||
|
||||
@@ -5,12 +5,16 @@
|
||||
|
||||
<file alias="repeat16.png">icons/view-media-repeat16.png</file>
|
||||
<file alias="repeat22.png">icons/view-media-repeat22.png</file>
|
||||
<file alias="repeat24.png">icons/view-media-repeat24.png</file>
|
||||
<file alias="repeat32.png">icons/view-media-repeat32.png</file>
|
||||
<file alias="repeat48.png">icons/view-media-repeat48.png</file>
|
||||
<!-- <file alias="repeat64.png">icons/view-media-repeat64.png</file> -->
|
||||
<file alias="shuffle16.png">icons/view-media-shuffle16.png</file>
|
||||
<file alias="shuffle22.png">icons/view-media-shuffle22.png</file>
|
||||
<file alias="shuffle24.png">icons/view-media-shuffle24.png</file>
|
||||
<file alias="shuffle32.png">icons/view-media-shuffle32.png</file>
|
||||
<file alias="shuffle48.png">icons/view-media-shuffle48.png</file>
|
||||
<!-- <file alias="shuffle64.png">icons/view-media-shuffle64.png</file> -->
|
||||
|
||||
<file alias="sidebar-albums-dark">icons/sidebar-albums-dark.svg</file>
|
||||
<file alias="sidebar-artists-dark">icons/sidebar-artists-dark.svg</file>
|
||||
|
||||
|
Before Width: | Height: | Size: 250 B After Width: | Height: | Size: 284 B |
|
Before Width: | Height: | Size: 285 B After Width: | Height: | Size: 3.3 KiB |
BIN
icons/view-media-repeat24.png
Normal file
|
After Width: | Height: | Size: 468 B |
|
Before Width: | Height: | Size: 339 B After Width: | Height: | Size: 495 B |
|
Before Width: | Height: | Size: 414 B After Width: | Height: | Size: 738 B |
BIN
icons/view-media-repeat64.png
Normal file
|
After Width: | Height: | Size: 934 B |
|
Before Width: | Height: | Size: 209 B After Width: | Height: | Size: 285 B |
|
Before Width: | Height: | Size: 325 B After Width: | Height: | Size: 3.3 KiB |
BIN
icons/view-media-shuffle24.png
Normal file
|
After Width: | Height: | Size: 471 B |
|
Before Width: | Height: | Size: 335 B After Width: | Height: | Size: 494 B |
|
Before Width: | Height: | Size: 495 B After Width: | Height: | Size: 720 B |
BIN
icons/view-media-shuffle64.png
Normal file
|
After Width: | Height: | Size: 924 B |
@@ -43,7 +43,7 @@
|
||||
|
||||
GLOBAL_STATIC(Icons, instance)
|
||||
|
||||
static QList<int> constStdSizes=QList<int>() << 16 << 22 << 32 << 48;
|
||||
static QList<int> constStdSizes=QList<int>() << 16 << 22 << 32 << 48; // << 64;
|
||||
|
||||
static const int constDarkLimit=80;
|
||||
static const int constDarkValue=64;
|
||||
@@ -107,7 +107,9 @@ static QPixmap createConsumeIconPixmap(int size, const QColor &col, double opaci
|
||||
border=4;
|
||||
} else if (48==size) {
|
||||
border=5;
|
||||
}
|
||||
} /*else if (64==size) {
|
||||
border=6;
|
||||
}*/
|
||||
p.setPen(QPen(col, size/10.0));
|
||||
p.setOpacity(opacity);
|
||||
p.setRenderHint(QPainter::Antialiasing, true);
|
||||
@@ -147,7 +149,11 @@ static QPixmap createMenuIconPixmap(int size, QColor col, double opacity=1.0)
|
||||
lineWidth=8;
|
||||
space=6;
|
||||
borderX=4;
|
||||
}
|
||||
} /*else if (64==size) {
|
||||
lineWidth=10;
|
||||
space=10;
|
||||
borderX=6;
|
||||
}*/
|
||||
|
||||
int borderY=((size-((3*lineWidth)+(2*space)))/2.0)+0.5;
|
||||
|
||||
@@ -254,7 +260,7 @@ static QPixmap recolour(const QImage &img, const QColor &col, double opacity=1.0
|
||||
return QPixmap::fromImage(i);
|
||||
}
|
||||
|
||||
static Icon createRecolourableIcon(const QString &name, const QColor &stdColor)
|
||||
static Icon createRecolourableIcon(const QString &name, const QColor &stdColor, int extraSize=24)
|
||||
{
|
||||
if (QColor(Qt::black)==stdColor) {
|
||||
// Text colour is black, so is icon, therefore no need to recolour!!!
|
||||
@@ -263,7 +269,8 @@ static Icon createRecolourableIcon(const QString &name, const QColor &stdColor)
|
||||
|
||||
Icon icon;
|
||||
|
||||
foreach (int s, constStdSizes) {
|
||||
QList<int> sizes=QList<int>() << constStdSizes << extraSize;
|
||||
foreach (int s, sizes) {
|
||||
QImage img(QChar(':')+name+QString::number(s));
|
||||
if (!img.isNull()) {
|
||||
icon.addPixmap(recolour(img, stdColor));
|
||||
|
||||