mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-18 23:27:09 +02:00
Added extra space to choosing sticker animation in left position.
This commit is contained in:
parent
a5be9d78d8
commit
fa4b7145f5
3 changed files with 13 additions and 1 deletions
|
@ -309,7 +309,7 @@ bool SendActionPainter::updateNeedsAnimating(crl::time now, bool force) {
|
|||
// FontData::spacew for more precise calculation.
|
||||
const auto mf = QFontMetricsF(_st.font->f);
|
||||
_spacesCount = std::round(
|
||||
_sendActionAnimation.width()
|
||||
_sendActionAnimation.widthNoMargins()
|
||||
/ mf.horizontalAdvance(' '));
|
||||
}
|
||||
newTypingString = newTypingString.replace(
|
||||
|
|
|
@ -38,6 +38,9 @@ public:
|
|||
bool supports(Type type) const;
|
||||
|
||||
virtual int width() const = 0;
|
||||
virtual int widthNoMargins() const {
|
||||
return width();
|
||||
}
|
||||
virtual void paint(
|
||||
Painter &p,
|
||||
style::color color,
|
||||
|
@ -520,6 +523,10 @@ public:
|
|||
}
|
||||
|
||||
int width() const override {
|
||||
return widthNoMargins() + _eye.step * 2;
|
||||
}
|
||||
|
||||
int widthNoMargins() const override {
|
||||
return st::historySendActionChooseStickerPosition.x()
|
||||
+ 2 * (_eye.outWidth + _eye.step)
|
||||
+ _eye.step;
|
||||
|
@ -681,6 +688,10 @@ int SendActionAnimation::width() const {
|
|||
return _impl ? _impl->width() : 0;
|
||||
}
|
||||
|
||||
int SendActionAnimation::widthNoMargins() const {
|
||||
return _impl ? _impl->widthNoMargins() : 0;
|
||||
}
|
||||
|
||||
void SendActionAnimation::paint(
|
||||
Painter &p,
|
||||
style::color color,
|
||||
|
|
|
@ -25,6 +25,7 @@ public:
|
|||
void tryToFinish();
|
||||
|
||||
int width() const;
|
||||
int widthNoMargins() const;
|
||||
void paint(
|
||||
Painter &p,
|
||||
style::color color,
|
||||
|
|
Loading…
Add table
Reference in a new issue