mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-10-09 03:42:20 +08:00
fix:下载取消后下载进度仍然在widget中显示
This commit is contained in:
parent
68d91f71ba
commit
a27c8b9ace
src/widgets
@ -90,6 +90,11 @@ void ProgressButton::setProgress(int progress)
|
|||||||
{
|
{
|
||||||
buttonState = state::openProgress;
|
buttonState = state::openProgress;
|
||||||
ProgressButton::progress = progress;
|
ProgressButton::progress = progress;
|
||||||
|
if(progress == 0)
|
||||||
|
{
|
||||||
|
buttonState = state::normal;
|
||||||
|
update();
|
||||||
|
}
|
||||||
if(progress == 100)
|
if(progress == 100)
|
||||||
{
|
{
|
||||||
buttonState = state::closeProgress;
|
buttonState = state::closeProgress;
|
||||||
|
@ -44,7 +44,9 @@ DownloadListWidget::DownloadListWidget(QWidget *parent) :
|
|||||||
size2 = download_size;
|
size2 = download_size;
|
||||||
}
|
}
|
||||||
if(isdownload){
|
if(isdownload){
|
||||||
downloaditemlist[nowDownload - 1]->setSpeed(theSpeed);
|
downloaditemlist[nowDownload - 1]->setSpeed(theSpeed);
|
||||||
|
}else{
|
||||||
|
emit downloadProgress(0);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user