mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 14:45:14 +00:00
Refactor image transformation interfaces.
This commit is contained in:
@@ -446,8 +446,9 @@ void BackgroundRow::paintEvent(QPaintEvent *e) {
|
||||
if (!backThumb) {
|
||||
p.drawPixmap(0, 0, _background);
|
||||
} else {
|
||||
const auto &pix = backThumb->pixBlurred(
|
||||
st::settingsBackgroundThumb);
|
||||
const auto &pix = backThumb->pix(
|
||||
st::settingsBackgroundThumb,
|
||||
{ .options = Images::Option::Blur });
|
||||
const auto factor = cIntRetinaFactor();
|
||||
p.drawPixmap(
|
||||
0,
|
||||
@@ -612,8 +613,8 @@ void BackgroundRow::updateImage() {
|
||||
auto back = (paper.isPattern() || !background.gradientForFill().isNull())
|
||||
? preparePattern()
|
||||
: prepareNormal();
|
||||
Images::prepareRound(back, ImageRoundRadius::Small);
|
||||
_background = Ui::PixmapFromImage(std::move(back));
|
||||
_background = Ui::PixmapFromImage(
|
||||
Images::Round(std::move(back), ImageRoundRadius::Small));
|
||||
_background.setDevicePixelRatio(cRetinaFactor());
|
||||
|
||||
rtlupdate(radialRect());
|
||||
|
Reference in New Issue
Block a user