mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 09:23:03 +00:00
delay show menu
Change-Id: I93c2935e0840c74a81454ab9e895fead8c8a5222
This commit is contained in:
parent
80d9339169
commit
fff93f9f64
Notes:
Deepin Code Review
2016-08-10 02:29:11 +00:00
Verified+1: Anonymous Coward #1000004 Code-Review+2: 石博文 <sbw@sbw.so> Submitted-by: 石博文 <sbw@sbw.so> Submitted-at: Wed, 10 Aug 2016 02:29:11 +0000 Reviewed-on: https://cr.deepin.io/15059 Project: dde/dde-dock Branch: refs/heads/master
@ -254,8 +254,10 @@ void AppItem::mousePressEvent(QMouseEvent *e)
|
||||
if (e->button() == Qt::RightButton)
|
||||
{
|
||||
if (perfectIconRect().contains(e->pos()))
|
||||
return showContextMenu();
|
||||
else
|
||||
{
|
||||
QMetaObject::invokeMethod(this, "showContextMenu", Qt::QueuedConnection);
|
||||
return;
|
||||
} else
|
||||
return QWidget::mousePressEvent(e);
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,6 @@ protected:
|
||||
const QPoint popupMarkPoint();
|
||||
|
||||
void hidePopup();
|
||||
void showContextMenu();
|
||||
void showHoverTips();
|
||||
void popupWindowAccept();
|
||||
void showPopupApplet(QWidget * const applet);
|
||||
@ -58,6 +57,9 @@ protected:
|
||||
virtual const QString contextMenu() const;
|
||||
virtual QWidget *popupTips();
|
||||
|
||||
protected slots:
|
||||
void showContextMenu();
|
||||
|
||||
private:
|
||||
void updatePopupPosition();
|
||||
void showPopupWindow(QWidget * const content, const bool model = false);
|
||||
|
@ -23,7 +23,7 @@ DeviceControlWidget::DeviceControlWidget(QWidget *parent)
|
||||
|
||||
m_seperator = new HorizontalSeperator;
|
||||
m_seperator->setFixedHeight(1);
|
||||
m_seperator->setColor(0.1);
|
||||
m_seperator->setColor(Qt::black);
|
||||
|
||||
QVBoxLayout *centeralLayout = new QVBoxLayout;
|
||||
centeralLayout->addStretch();
|
||||
|
Loading…
x
Reference in New Issue
Block a user