MCPcopy Create free account
hub / github.com/TDesktop-x64/tdesktop / innerPosition

Method innerPosition

Telegram/SourceFiles/window/window_media_preview.cpp:180–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

178}
179
180QPoint MediaPreviewWidget::innerPosition(QSize size) const {
181 if (!_document || !_document->isPremiumSticker()) {
182 return QPoint(
183 (width() - size.width()) / 2,
184 (height() - size.height()) / 2 + _contentShiftY);
185 }
186 const auto outer = size * kPremiumMultiplier;
187 const auto shift = size.width() * kPremiumShift;
188 return outerPosition(size)
189 + QPoint(
190 outer.width() - size.width() - shift,
191 (outer.height() - size.height()) / 2);
192}
193
194QPoint MediaPreviewWidget::outerPosition(QSize size) const {
195 const auto outer = size * kPremiumMultiplier;

Callers

nothing calls this directly

Calls 3

isPremiumStickerMethod · 0.80
widthMethod · 0.45
heightMethod · 0.45

Tested by

no test coverage detected