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

Projects ready for Xcode and QtCreator. Retina circle masks fixed. 9049004 beta.

This commit is contained in:
John Preston
2016-06-09 20:54:31 +03:00
parent dbe4a5b7c7
commit 3bb53b6ed1
7 changed files with 30 additions and 14 deletions

View File

@@ -104,14 +104,14 @@ namespace internal {
QImage createCircleMask(int size, const QColor &bg, const QColor &fg) {
int realSize = size * cIntRetinaFactor();
auto result = QImage(size, size, QImage::Format::Format_Grayscale8);
auto result = QImage(realSize, realSize, QImage::Format::Format_Grayscale8);
{
QPainter pcircle(&result);
pcircle.setRenderHint(QPainter::HighQualityAntialiasing, true);
pcircle.fillRect(0, 0, size, size, bg);
pcircle.fillRect(0, 0, realSize, realSize, bg);
pcircle.setPen(Qt::NoPen);
pcircle.setBrush(fg);
pcircle.drawEllipse(0, 0, size, size);
pcircle.drawEllipse(0, 0, realSize, realSize);
}
result.setDevicePixelRatio(cRetinaFactor());
return result;