Skip to content

Commit

Permalink
fix: abnormal when background pixmap missing
Browse files Browse the repository at this point in the history
如果壁纸无效或者丢失了使用纯色背景,至少有个背景颜色吧

Issue: linuxdeepin/developer-center#8546
  • Loading branch information
kegechen committed May 15, 2024
1 parent 4600406 commit 93c7b82
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/widgets/fullscreenbackground.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ void FullscreenBackground::paintEvent(QPaintEvent *e)
const QPixmap &blurBackground = getPixmap(PIXMAP_TYPE_BLUR_BACKGROUND);

const QRect trueRect(QPoint(0, 0), QSize(size() * devicePixelRatioF()));
if (m_useSolidBackground) {
if (m_useSolidBackground || (background.isNull() && blurBackground.isNull())) {
painter.fillRect(trueRect, QColor(DDESESSIONCC::SOLID_BACKGROUND_COLOR));
} else {
if (m_fadeOutAni) {
Expand Down

0 comments on commit 93c7b82

Please sign in to comment.