From 26c08236cd6bc94149545693a0326ca42264de9e Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 28 Nov 2016 16:42:37 +0300 Subject: [PATCH] Fixed build for Xcode. Round cap used in radial animations. --- Telegram/SourceFiles/intro/introwidget.cpp | 4 ++++ Telegram/SourceFiles/intro/introwidget.h | 7 +++++++ Telegram/SourceFiles/ui/buttons/history_down_button.cpp | 5 ++++- Telegram/SourceFiles/ui/effects/radial_animation.cpp | 1 + 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/intro/introwidget.cpp b/Telegram/SourceFiles/intro/introwidget.cpp index 5e708e9a5..61202fef1 100644 --- a/Telegram/SourceFiles/intro/introwidget.cpp +++ b/Telegram/SourceFiles/intro/introwidget.cpp @@ -768,4 +768,8 @@ void Widget::Step::finished() { hide(); } +Widget::Step::CoverAnimation::~CoverAnimation() = default; + +Widget::Step::~Step() = default; + } // namespace Intro diff --git a/Telegram/SourceFiles/intro/introwidget.h b/Telegram/SourceFiles/intro/introwidget.h index 07c0addd4..5707268f0 100644 --- a/Telegram/SourceFiles/intro/introwidget.h +++ b/Telegram/SourceFiles/intro/introwidget.h @@ -126,6 +126,8 @@ public: showError(QString()); } + ~Step(); + protected: void paintEvent(QPaintEvent *e) override; void resizeEvent(QResizeEvent *e) override; @@ -159,6 +161,11 @@ public: private: struct CoverAnimation { + CoverAnimation() = default; + CoverAnimation(CoverAnimation &&other) = default; + CoverAnimation &operator=(CoverAnimation &&other) = default; + ~CoverAnimation(); + std_::unique_ptr title; std_::unique_ptr description; diff --git a/Telegram/SourceFiles/ui/buttons/history_down_button.cpp b/Telegram/SourceFiles/ui/buttons/history_down_button.cpp index a44d1fd9f..1ba5d6f46 100644 --- a/Telegram/SourceFiles/ui/buttons/history_down_button.cpp +++ b/Telegram/SourceFiles/ui/buttons/history_down_button.cpp @@ -140,7 +140,10 @@ void EmojiButton::paintEvent(QPaintEvent *e) { icon->paint(p, _st.iconPosition, width()); p.setOpacity(1.); - p.setPen(QPen(over ? st::historyEmojiCircleFgOver : st::historyEmojiCircleFg, st::historyEmojiCircleLine)); + auto pen = (over ? st::historyEmojiCircleFgOver : st::historyEmojiCircleFg)->p; + pen.setWidth(st::historyEmojiCircleLine); + pen.setCapStyle(Qt::RoundCap); + p.setPen(pen); p.setBrush(Qt::NoBrush); p.setRenderHint(QPainter::HighQualityAntialiasing); diff --git a/Telegram/SourceFiles/ui/effects/radial_animation.cpp b/Telegram/SourceFiles/ui/effects/radial_animation.cpp index 144e8fbcb..4b851dcf0 100644 --- a/Telegram/SourceFiles/ui/effects/radial_animation.cpp +++ b/Telegram/SourceFiles/ui/effects/radial_animation.cpp @@ -76,6 +76,7 @@ void RadialAnimation::draw(Painter &p, const QRect &inner, int32 thickness, cons QPen pen(color->p), was(p.pen()); pen.setWidth(thickness); + pen.setCapStyle(Qt::RoundCap); p.setPen(pen); int32 len = MinArcLength + a_arcEnd.current();