2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-05 08:55:59 +00:00

Moved MultiSelect to td_ui.

This commit is contained in:
23rd
2022-03-20 10:23:53 +03:00
parent cd97495208
commit 964b0f4f79
3 changed files with 8 additions and 6 deletions

View File

@@ -365,14 +365,14 @@ void Item::prepareCache() {
if (!_cache.isNull()) return;
Assert(!_visibility.animating());
auto cacheWidth = _width * kWideScale * cIntRetinaFactor();
auto cacheHeight = _st.height * kWideScale * cIntRetinaFactor();
auto cacheWidth = _width * kWideScale * style::DevicePixelRatio();
auto cacheHeight = _st.height * kWideScale * style::DevicePixelRatio();
auto data = QImage(
cacheWidth,
cacheHeight,
QImage::Format_ARGB32_Premultiplied);
data.fill(Qt::transparent);
data.setDevicePixelRatio(cRetinaFactor());
data.setDevicePixelRatio(style::DevicePixelRatio());
{
Painter p(&data);
paintOnce(
@@ -774,7 +774,9 @@ void MultiSelect::Inner::paintEvent(QPaintEvent *e) {
auto paintRect = e->rect();
p.fillRect(paintRect, _st.bg);
auto offset = QPoint(rtl() ? _st.padding.right() : _st.padding.left(), _st.padding.top());
auto offset = QPoint(
style::RightToLeft() ? _st.padding.right() : _st.padding.left(),
_st.padding.top());
p.translate(offset);
paintRect.translate(-offset);