Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
deepin-unioncode (1.4.20) unstable; urgency=medium

* chore: remove qt6-multimedia-dev build dependency
* chore: downgrade cmake minimum required version
* chore: update icon installation to follow freedesktop standards
* refactor: improve loading widget animation and structure

-- Liu Zhangjian <liuzhangjian@uniontech.com> Tue, 10 Feb 2026 13:57:55 +0800

deepin-unioncode (1.4.19) unstable; urgency=medium

* feat: update IDE icon design and installation
Expand Down
49 changes: 25 additions & 24 deletions src/plugins/core/gui/loadingwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@

DWIDGET_USE_NAMESPACE

static float opacity = 1.0;

loadingWidget::loadingWidget(QWidget *parent)
: DWidget(parent)
{
Expand All @@ -21,33 +19,36 @@ loadingWidget::loadingWidget(QWidget *parent)
loadingText->setText(tr("loading..."));
loadingText->setAlignment(Qt::AlignCenter);

vlayout->addWidget(backgroundLogo);
vlayout->addWidget(logo);
vlayout->addWidget(loadingText);
vlayout->setAlignment(Qt::AlignCenter);
}

void loadingWidget::setLogo()
{
backgroundLogo = new DLabel(this);
backgroundLogo->setPixmap(QIcon::fromTheme("deepin_unioncode_backgroundLogo").pixmap(128));

logo = new DLabel(backgroundLogo);
logo->setPixmap(QIcon::fromTheme("deepin_unioncode_logo").pixmap(128));

QHBoxLayout *hlayout = new QHBoxLayout;
hlayout->addWidget(logo);
backgroundLogo->setLayout(hlayout);

opacityEffect = new QGraphicsOpacityEffect(this);

connect(&timer, &QTimer::timeout, this, [=]() {
opacity -= 0.1;

if (opacity < -0.9)
opacity = 1.0;

opacityEffect->setOpacity(qAbs(opacity));
logo->setGraphicsEffect(opacityEffect);
logo = new DLabel(this);
logo->setPixmap(QIcon::fromTheme("ide").pixmap(128));
logo->setAlignment(Qt::AlignCenter);

opacityEffect = new QGraphicsOpacityEffect(logo);
logo->setGraphicsEffect(opacityEffect);

connect(&timer, &QTimer::timeout, this, [this]() {
// 透明度在 0.3 到 1.0 之间循环变化,产生呼吸效果
if (fadeOut) {
logoOpacity -= 0.05;
if (logoOpacity <= 0.3) {
logoOpacity = 0.3;
fadeOut = false;
}
} else {
logoOpacity += 0.05;
if (logoOpacity >= 1.0) {
logoOpacity = 1.0;
fadeOut = true;
}
}
opacityEffect->setOpacity(logoOpacity);
});
timer.start(150);
timer.start(50);
}
3 changes: 2 additions & 1 deletion src/plugins/core/gui/loadingwidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ class loadingWidget : public DTK_WIDGET_NAMESPACE::DWidget
void setLogo();

DTK_WIDGET_NAMESPACE::DLabel *logo { nullptr };
DTK_WIDGET_NAMESPACE::DLabel *backgroundLogo { nullptr };
DTK_WIDGET_NAMESPACE::DLabel *loadingText { nullptr };
QGraphicsOpacityEffect *opacityEffect { nullptr };
QTimer timer;
float logoOpacity { 1.0 };
bool fadeOut { true };
};

#endif // LOADINGWIDGET_H
Loading