mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Fix build with GCC.
This commit is contained in:
@@ -991,23 +991,15 @@ void MainMenu::refreshBackground() {
|
||||
const auto fill = QSize(st::mainMenuWidth, st::mainMenuCoverHeight);
|
||||
const auto intensityText = IntensityOfColor(st::mainMenuCoverFg->c);
|
||||
const auto background = Window::Theme::Background();
|
||||
const auto &paper = background->paper();
|
||||
const auto &prepared = background->prepared();
|
||||
|
||||
const auto rects = Ui::ComputeChatBackgroundRects(
|
||||
fill,
|
||||
prepared.size());
|
||||
|
||||
auto backgroundImage = /*paper.isPattern()
|
||||
? Ui::GenerateBackgroundImage(
|
||||
fill * cIntRetinaFactor(),
|
||||
paper.backgroundColors(),
|
||||
paper.gradientRotation(),
|
||||
paper.patternOpacity(),
|
||||
[&](QPainter &p) { p.drawImage(rects.to, prepared, rects.from); })
|
||||
: */QImage(
|
||||
fill * cIntRetinaFactor(),
|
||||
QImage::Format_ARGB32_Premultiplied);
|
||||
auto backgroundImage = QImage(
|
||||
fill * cIntRetinaFactor(),
|
||||
QImage::Format_ARGB32_Premultiplied);
|
||||
QPainter p(&backgroundImage);
|
||||
|
||||
const auto drawShadow = [](QPainter &p) {
|
||||
@@ -1021,21 +1013,8 @@ void MainMenu::refreshBackground() {
|
||||
: Qt::black);
|
||||
};
|
||||
|
||||
// Solid color.
|
||||
//if (const auto color = background->colorForFill()) {
|
||||
// const auto intensity = IntensityOfColor(*color);
|
||||
// p.fillRect(QRect(QPoint(), fill), *color);
|
||||
// if (std::abs(intensity - intensityText) < kMinDiffIntensity) {
|
||||
// drawShadow(p);
|
||||
// }
|
||||
// _background = backgroundImage;
|
||||
// return;
|
||||
//}
|
||||
|
||||
// Background image.
|
||||
//if (!paper.isPattern()) {
|
||||
p.drawImage(rects.to, prepared, rects.from);
|
||||
//}
|
||||
p.drawImage(rects.to, prepared, rects.from);
|
||||
|
||||
// Cut off the part of the background that is under text.
|
||||
const QRect underText(
|
||||
|
Reference in New Issue
Block a user