mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Fixed overlap of reply icon on left swipe of message with right action.
This commit is contained in:
parent
18c9ee093b
commit
c589ee1ca5
1 changed files with 5 additions and 1 deletions
|
@ -1493,6 +1493,7 @@ void Message::draw(Painter &p, const PaintContext &context) const {
|
||||||
|
|
||||||
constexpr auto kShiftRatio = 1.5;
|
constexpr auto kShiftRatio = 1.5;
|
||||||
constexpr auto kBouncePart = 0.25;
|
constexpr auto kBouncePart = 0.25;
|
||||||
|
constexpr auto kMaxHeightRatio = 3.5;
|
||||||
constexpr auto kStrokeWidth = 2.;
|
constexpr auto kStrokeWidth = 2.;
|
||||||
constexpr auto kWaveWidth = 10.;
|
constexpr auto kWaveWidth = 10.;
|
||||||
const auto isLeftSize = (!context.outbg)
|
const auto isLeftSize = (!context.outbg)
|
||||||
|
@ -1501,7 +1502,10 @@ void Message::draw(Painter &p, const PaintContext &context) const {
|
||||||
const auto reachRatio = context.gestureHorizontal.reachRatio;
|
const auto reachRatio = context.gestureHorizontal.reachRatio;
|
||||||
const auto size = st::historyFastShareSize;
|
const auto size = st::historyFastShareSize;
|
||||||
const auto outerWidth = st::historySwipeIconSkip
|
const auto outerWidth = st::historySwipeIconSkip
|
||||||
+ (isLeftSize ? rect::right(g) : width());
|
+ (isLeftSize ? rect::right(g) : width())
|
||||||
|
+ ((g.height() < size * kMaxHeightRatio)
|
||||||
|
? rightActionSize().value_or(QSize()).width()
|
||||||
|
: 0);
|
||||||
const auto rect = QRectF(
|
const auto rect = QRectF(
|
||||||
outerWidth
|
outerWidth
|
||||||
- (size * kShiftRatio * context.gestureHorizontal.ratio)
|
- (size * kShiftRatio * context.gestureHorizontal.ratio)
|
||||||
|
|
Loading…
Add table
Reference in a new issue