Removed cIntRetinaFactor and cRetinaFactor.

This commit is contained in:
23rd
2024-03-24 01:04:33 +03:00
parent 58fcedab64
commit d03d50ef0d
64 changed files with 411 additions and 270 deletions

View File

@@ -87,9 +87,9 @@ void EdgeButton::init() {
QImage EdgeButton::rounded(std::optional<QColor> color) const {
auto result = QImage(
_rippleRect.size() * cIntRetinaFactor(),
_rippleRect.size() * style::DevicePixelRatio(),
QImage::Format_ARGB32_Premultiplied);
result.setDevicePixelRatio(cIntRetinaFactor());
result.setDevicePixelRatio(style::DevicePixelRatio());
result.fill(color.value_or(Qt::white));
const auto parts = RectPart::None
@@ -170,9 +170,9 @@ ButtonBar::ButtonBar(
}
auto result = QImage(
size * cIntRetinaFactor(),
size * style::DevicePixelRatio(),
QImage::Format_ARGB32_Premultiplied);
result.setDevicePixelRatio(cIntRetinaFactor());
result.setDevicePixelRatio(style::DevicePixelRatio());
result.fill(bg->c);
_roundedBg = Images::Round(

View File

@@ -43,7 +43,7 @@ ItemSticker::ItemSticker(
_mediaView.get(),
ChatHelpers::StickerLottieSize::MessageHistory,
QSize(kStickerSideSize, kStickerSideSize)
* cIntRetinaFactor(),
* style::DevicePixelRatio(),
Lottie::Quality::High);
_lottie.player->updates(
) | rpl::start_with_next([=] {