From 132d8846002e9fd3a81bc5f0c86fdebb35f7ce94 Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 17 May 2017 23:49:20 +0300 Subject: [PATCH] Fix Ui::ImportantTooltip render on OS X 10.6-10.7. --- Telegram/SourceFiles/ui/widgets/tooltip.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Telegram/SourceFiles/ui/widgets/tooltip.cpp b/Telegram/SourceFiles/ui/widgets/tooltip.cpp index ae2c273c34..40755973b7 100644 --- a/Telegram/SourceFiles/ui/widgets/tooltip.cpp +++ b/Telegram/SourceFiles/ui/widgets/tooltip.cpp @@ -153,9 +153,7 @@ void Tooltip::paintEvent(QPaintEvent *e) { if (_useTransparency) { Platform::StartTranslucentPaint(p, e); - } - if (_useTransparency) { p.setPen(_st->textBorder); p.setBrush(_st->textBg); PainterHighQualityEnabler hq(p); @@ -334,7 +332,9 @@ void ImportantTooltip::checkAnimationFinish() { _cache = QPixmap(); showChildren(); setVisible(_visible); - if (!_visible && _hiddenCallback) { + if (_visible) { + update(); + } else if (_hiddenCallback) { _hiddenCallback(); } } @@ -383,7 +383,6 @@ void ImportantTooltip::paintEvent(QPaintEvent *e) { auto inner = countInner(); if (_useTransparency) { - Platform::StartTranslucentPaint(p, e); if (!_cache.isNull()) { auto opacity = _visibleAnimation.current(_visible ? 1. : 0.); p.setOpacity(opacity);