mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00
fix: can not drag back to normal container
can not drag back to normal container when all wrappers in normal be drag out Change-Id: Id6f2ddef8616bc9ea7656b87e903af8b0565a7f5
This commit is contained in:
parent
9dde0f6d30
commit
f39a678d04
Notes:
gerrit
2019-01-02 09:55:14 +08:00
Verified+1: <jenkins@deepin.com> Code-Review+2: listenerri <listenerri@gmail.com> Submitted-by: listenerri <listenerri@gmail.com> Submitted-at: Wed, 02 Jan 2019 09:55:13 +0800 Reviewed-on: https://cr.deepin.io/41007 Project: dde/dde-dock Branch: refs/heads/dev/drag-and-hold-tray
@ -4,7 +4,6 @@
|
||||
NormalContainer::NormalContainer(TrayPlugin *trayPlugin, QWidget *parent)
|
||||
: AbstractContainer(trayPlugin, parent)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool NormalContainer::acceptWrapper(FashionTrayWidgetWrapper *wrapper)
|
||||
@ -26,7 +25,16 @@ void NormalContainer::addWrapper(FashionTrayWidgetWrapper *wrapper)
|
||||
|
||||
void NormalContainer::refreshVisible()
|
||||
{
|
||||
setVisible(expand() && !isEmpty());
|
||||
if (isEmpty()) {
|
||||
// set the minimum size to 1 to avoid can not drag back wrappers when
|
||||
// all wrappers has been drag out
|
||||
setMinimumSize(1, 1);
|
||||
} else {
|
||||
// set the minimum size back to 0 in order to make the fold animation works correctly
|
||||
setMinimumSize(0, 0);
|
||||
}
|
||||
|
||||
setVisible(expand());
|
||||
}
|
||||
|
||||
void NormalContainer::setExpand(const bool expand)
|
||||
|
Loading…
x
Reference in New Issue
Block a user