Skip to content

Commit 62627a3

Browse files
sync: from linuxdeepin/dde-session-shell
Synchronize source files from linuxdeepin/dde-session-shell. Source-pull-request: linuxdeepin/dde-session-shell#15
1 parent 42d276a commit 62627a3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/widgets/dlineeditex.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,10 @@ void DLineEditEx::startAnimation()
9999
}
100100
m_loadSlider->show();
101101
m_loadSlider->resize(40, height());
102-
m_animation->setStartValue(QPoint(0 - 40, 0));
103-
m_animation->setEndValue(QPoint(width(), 0));
102+
// 动画块距离右侧的距离10px结束
103+
int endX = (width() - m_loadSlider->width() - 10) > 0 ? width() - m_loadSlider->width() - 10 : width();
104+
m_animation->setStartValue(QPoint(0 , 0));
105+
m_animation->setEndValue(QPoint(endX, 0));
104106
m_animation->start();
105107
}
106108

0 commit comments

Comments
 (0)