add placeholder type

Change-Id: Ia0aebf40fd5dd4547ca99b23af0090cfe16c0b70
This commit is contained in:
石博文 2017-12-05 18:49:48 +08:00
parent 1efca7f945
commit 8207f2f01a
Notes: Deepin Code Review 2017-12-05 19:27:28 +08:00
Verified+1: Anonymous Coward #1000004
Verified+1: electricface <songwentai@deepin.com>
Code-Review+2: 石博文 <sbw@sbw.so>
Submitted-by: 石博文 <sbw@sbw.so>
Submitted-at: Tue, 05 Dec 2017 19:27:28 +0800
Reviewed-on: https://cr.deepin.io/29165
Project: dde/dde-dock
Branch: refs/heads/master
6 changed files with 8 additions and 6 deletions

View File

@ -45,7 +45,7 @@ public:
static int itemBaseHeight();
static int itemBaseWidth();
inline ItemType itemType() const {return App;}
inline ItemType itemType() const { return App; }
signals:
void requestActivateWindow(const WId wid) const;

View File

@ -43,6 +43,7 @@ public:
Stretch,
Plugins,
Container,
Placeholder,
};
public:

View File

@ -31,8 +31,7 @@ class PlaceholderItem : public DockItem
public:
explicit PlaceholderItem(QWidget *parent = 0);
// fake as app item
inline ItemType itemType() const {return App;}
inline ItemType itemType() const { return Placeholder; }
};
#endif // PLACEHOLDERITEM_H

View File

@ -477,6 +477,7 @@ void MainPanel::adjustItemSize()
switch (item->itemType())
{
case DockItem::Placeholder:
case DockItem::App:
case DockItem::Launcher:
item->setFixedSize(itemSize);

View File

@ -470,6 +470,7 @@ void DockSettings::calculateWindowConfig()
case DockItem::Launcher:
case DockItem::App:
case DockItem::Plugins:
case DockItem::Placeholder:
++visibleItemCount;
break;
default:;

View File

@ -76,12 +76,12 @@ MainWindow::MainWindow(QWidget *parent)
setAttribute(Qt::WA_TranslucentBackground);
setAcceptDrops(true);
m_platformWindowHandle.setShadowRadius(0);
m_platformWindowHandle.setEnableBlurWindow(false);
m_platformWindowHandle.setTranslucentBackground(true);
m_platformWindowHandle.setWindowRadius(0);
m_platformWindowHandle.setBorderWidth(0);
m_platformWindowHandle.setShadowOffset(QPoint(0, 0));
m_platformWindowHandle.setShadowRadius(0);
m_settings = new DockSettings(this);
m_xcbMisc->set_window_type(winId(), XcbMisc::Dock);
@ -673,8 +673,8 @@ void MainWindow::adjustShadowMask()
m_panelShowAni->state() == QPauseAnimation::Running ||
!m_wmHelper->hasComposite())
{
m_platformWindowHandle.setShadowRadius(0);
m_platformWindowHandle.setClipPath(QPainterPath());
m_platformWindowHandle.setShadowRadius(0);
return;
}
@ -703,6 +703,6 @@ void MainWindow::adjustShadowMask()
path.addRect(r);
}
m_platformWindowHandle.setShadowRadius(60);
m_platformWindowHandle.setClipPath(path);
m_platformWindowHandle.setShadowRadius(60);
}