@@ -151,8 +151,7 @@ PeerShortInfoCover::PeerShortInfoCover(
151151
152152 refreshLabelsGeometry ();
153153
154- _roundedTopImage = QImage (
155- QSize (_st.size , _st.radius ) * style::DevicePixelRatio (),
154+ _roundedTopImage = QImage (style::DevicePixels (QSize (_st.size , _st.radius )),
156155 QImage::Format_ARGB32_Premultiplied);
157156 _roundedTopImage.setDevicePixelRatio (style::DevicePixelRatio ());
158157 _roundedTopImage.fill (Qt::transparent);
@@ -196,7 +195,7 @@ void PeerShortInfoCover::paint(QPainter &p) {
196195 RectPart::TopLeft | RectPart::TopRight);
197196 } else if (_userpicImage.isNull ()) {
198197 auto image = QImage (
199- _widget->size () * style::DevicePixelRatio ( ),
198+ style::DevicePixels ( _widget->size ()),
200199 QImage::Format_ARGB32_Premultiplied);
201200 image.fill (Qt::black);
202201 _userpicImage = Images::Round (
@@ -602,9 +601,10 @@ void PeerShortInfoCover::refreshBarImages() {
602601 _largeWidth = _smallWidth + 1 ;
603602 const auto makeBar = [&](int size) {
604603 const auto radius = _st.line / 2 .;
605- auto result = QImage (
606- QSize (size, _st.line ) * style::DevicePixelRatio (),
607- QImage::Format_ARGB32_Premultiplied);
604+ const auto resultSize = QSize (
605+ style::DevicePixels (size),
606+ style::DevicePixels (_st.line ));
607+ auto result = QImage (resultSize, QImage::Format_ARGB32_Premultiplied);
608608 result.setDevicePixelRatio (style::DevicePixelRatio ());
609609 result.fill (Qt::transparent);
610610 auto p = QPainter (&result);
@@ -733,7 +733,7 @@ void PeerShortInfoBox::prepare() {
733733 }, _topRoundBackground->lifetime ());
734734
735735 _roundedTop = QImage (
736- _topRoundBackground->size () * style::DevicePixelRatio ( ),
736+ style::DevicePixels ( _topRoundBackground->size ()),
737737 QImage::Format_ARGB32_Premultiplied);
738738 _roundedTop.setDevicePixelRatio (style::DevicePixelRatio ());
739739 refreshRoundedTopImage (getDelegate ()->style ().bg ->c );
0 commit comments