mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 22:46:10 +00:00
Fixed overlap of reply icon on left swipe of message with right action.
This commit is contained in:
@@ -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)
|
||||||
|
Reference in New Issue
Block a user