Fix Ui::ImportantTooltip render on OS X 10.6-10.7.

This commit is contained in:
John Preston 2017-05-17 23:49:20 +03:00
parent b4d10ca693
commit 132d884600
1 changed files with 3 additions and 4 deletions

View File

@ -153,9 +153,7 @@ void Tooltip::paintEvent(QPaintEvent *e) {
if (_useTransparency) { if (_useTransparency) {
Platform::StartTranslucentPaint(p, e); Platform::StartTranslucentPaint(p, e);
}
if (_useTransparency) {
p.setPen(_st->textBorder); p.setPen(_st->textBorder);
p.setBrush(_st->textBg); p.setBrush(_st->textBg);
PainterHighQualityEnabler hq(p); PainterHighQualityEnabler hq(p);
@ -334,7 +332,9 @@ void ImportantTooltip::checkAnimationFinish() {
_cache = QPixmap(); _cache = QPixmap();
showChildren(); showChildren();
setVisible(_visible); setVisible(_visible);
if (!_visible && _hiddenCallback) { if (_visible) {
update();
} else if (_hiddenCallback) {
_hiddenCallback(); _hiddenCallback();
} }
} }
@ -383,7 +383,6 @@ void ImportantTooltip::paintEvent(QPaintEvent *e) {
auto inner = countInner(); auto inner = countInner();
if (_useTransparency) { if (_useTransparency) {
Platform::StartTranslucentPaint(p, e);
if (!_cache.isNull()) { if (!_cache.isNull()) {
auto opacity = _visibleAnimation.current(_visible ? 1. : 0.); auto opacity = _visibleAnimation.current(_visible ? 1. : 0.);
p.setOpacity(opacity); p.setOpacity(opacity);