mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-03 07:56:03 +00:00
Fix popup menu rendering in OS X 10.6-10.7. #2839
This commit is contained in:
@@ -107,6 +107,12 @@ PopupMenu::Actions &PopupMenu::actions() {
|
|||||||
void PopupMenu::paintEvent(QPaintEvent *e) {
|
void PopupMenu::paintEvent(QPaintEvent *e) {
|
||||||
Painter p(this);
|
Painter p(this);
|
||||||
|
|
||||||
|
#ifdef OS_MAC_OLD
|
||||||
|
p.setCompositionMode(QPainter::CompositionMode_Source);
|
||||||
|
p.fillRect(e->rect(), Qt::transparent);
|
||||||
|
p.setCompositionMode(QPainter::CompositionMode_SourceOver);
|
||||||
|
#endif // OS_MAC_OLD
|
||||||
|
|
||||||
auto ms = getms();
|
auto ms = getms();
|
||||||
if (_a_show.animating(ms)) {
|
if (_a_show.animating(ms)) {
|
||||||
if (auto opacity = _a_opacity.current(ms, _hiding ? 0. : 1.)) {
|
if (auto opacity = _a_opacity.current(ms, _hiding ? 0. : 1.)) {
|
||||||
|
@@ -156,6 +156,12 @@ void Tooltip::popup(const QPoint &m, const QString &text, const style::Tooltip *
|
|||||||
void Tooltip::paintEvent(QPaintEvent *e) {
|
void Tooltip::paintEvent(QPaintEvent *e) {
|
||||||
Painter p(this);
|
Painter p(this);
|
||||||
|
|
||||||
|
#ifdef OS_MAC_OLD
|
||||||
|
p.setCompositionMode(QPainter::CompositionMode_Source);
|
||||||
|
p.fillRect(e->rect(), Qt::transparent);
|
||||||
|
p.setCompositionMode(QPainter::CompositionMode_SourceOver);
|
||||||
|
#endif // OS_MAC_OLD
|
||||||
|
|
||||||
if (_useTransparency) {
|
if (_useTransparency) {
|
||||||
p.setPen(_st->textBorder);
|
p.setPen(_st->textBorder);
|
||||||
p.setBrush(_st->textBg);
|
p.setBrush(_st->textBg);
|
||||||
|
Reference in New Issue
Block a user