2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Some colors split for the palette. Theme preview applying improved.

Also attempting to fix travis build.
This commit is contained in:
John Preston
2017-01-11 12:16:44 +04:00
parent 30c9bcb985
commit 2d185cf66e
13 changed files with 121 additions and 70 deletions

View File

@@ -399,17 +399,17 @@ void Video::paint(Painter &p, const QRect &clip, TextSelection selection, const
p.setOpacity((radial && loaded) ? _radial->opacity() : 1);
auto icon = ([radial, loaded, selected] {
if (radial) {
return &(selected ? st::historyFileInCancelSelected : st::historyFileInCancel);
return &(selected ? st::historyFileThumbCancelSelected : st::historyFileThumbCancel);
} else if (loaded) {
return &(selected ? st::historyFileInPlaySelected : st::historyFileInPlay);
return &(selected ? st::historyFileThumbPlaySelected : st::historyFileThumbPlay);
}
return &(selected ? st::historyFileInDownloadSelected : st::historyFileInDownload);
return &(selected ? st::historyFileThumbDownloadSelected : st::historyFileThumbDownload);
})();
icon->paintInCenter(p, inner);
if (radial) {
p.setOpacity(1);
QRect rinner(inner.marginsRemoved(QMargins(st::msgFileRadialLine, st::msgFileRadialLine, st::msgFileRadialLine, st::msgFileRadialLine)));
_radial->draw(p, rinner, st::msgFileRadialLine, selected ? st::msgInBgSelected : st::msgInBg);
_radial->draw(p, rinner, st::msgFileRadialLine, selected ? st::historyFileThumbRadialFgSelected : st::historyFileThumbRadialFg);
}
}
@@ -830,16 +830,16 @@ void Document::paint(Painter &p, const QRect &clip, TextSelection selection, con
p.setOpacity(radialOpacity);
auto icon = ([loaded, this, selected] {
if (loaded || _data->loading()) {
return &(selected ? st::historyFileInCancelSelected : st::historyFileInCancel);
return &(selected ? st::historyFileThumbCancelSelected : st::historyFileThumbCancel);
}
return &(selected ? st::historyFileInDownloadSelected : st::historyFileInDownload);
return &(selected ? st::historyFileThumbDownloadSelected : st::historyFileThumbDownload);
})();
icon->paintInCenter(p, inner);
if (radial) {
p.setOpacity(1);
QRect rinner(inner.marginsRemoved(QMargins(st::msgFileRadialLine, st::msgFileRadialLine, st::msgFileRadialLine, st::msgFileRadialLine)));
_radial->draw(p, rinner, st::msgFileRadialLine, selected ? st::msgInBgSelected : st::msgInBg);
_radial->draw(p, rinner, st::msgFileRadialLine, selected ? st::historyFileThumbRadialFgSelected : st::historyFileThumbRadialFg);
}
}
}