From d079108e2949db26cd2d83108559a71f70fe52e2 Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 22 Dec 2022 21:45:42 +0400 Subject: [PATCH] Fix toast label palette. Regression was introduced in eafd7dc818. --- ui/toast/toast_widget.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ui/toast/toast_widget.cpp b/ui/toast/toast_widget.cpp index 6d3981b..9640f88 100644 --- a/ui/toast/toast_widget.cpp +++ b/ui/toast/toast_widget.cpp @@ -149,13 +149,12 @@ void Widget::paintEvent(QPaintEvent *e) { width()); } - p.setTextPalette(_st->palette); - const auto lines = _maxTextHeight / _st->style.font->height; p.setPen(st::toastFg); _text.draw(p, { .position = { _st->padding.left(), _textTop }, .availableWidth = _textWidth + 1, + .palette = &_st->palette, .spoiler = Ui::Text::DefaultSpoilerCache(), .elisionLines = lines, });