mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Projects ready for Xcode and QtCreator. Retina circle masks fixed. 9049004 beta.
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user