mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00
add popup tips
Change-Id: I8cc518050a73465f2ca4d7dbdd31042973631e09
This commit is contained in:
parent
d3b66cedf5
commit
3443dbda56
Notes:
Deepin Code Review
2017-10-18 11:58:08 +08:00
Verified+1: Anonymous Coward #1000004 Verified+1: <zhaofangfang@linuxdeepin.com> Code-Review+2: 石博文 <sbw@sbw.so> Submitted-by: 石博文 <sbw@sbw.so> Submitted-at: Wed, 18 Oct 2017 11:58:07 +0800 Reviewed-on: https://cr.deepin.io/27106 Project: dde/dde-dock Branch: refs/heads/master
@ -26,9 +26,12 @@
|
||||
ContainerItem::ContainerItem(QWidget *parent)
|
||||
: DockItem(parent),
|
||||
m_dropping(false),
|
||||
m_popupTips(new QLabel),
|
||||
m_containerWidget(new ContainerWidget(this))
|
||||
{
|
||||
m_containerWidget->setVisible(false);
|
||||
m_popupTips->setText(tr("Click to display hidden icon"));
|
||||
m_popupTips->setVisible(false);
|
||||
|
||||
setAcceptDrops(true);
|
||||
}
|
||||
@ -117,3 +120,8 @@ QSize ContainerItem::sizeHint() const
|
||||
{
|
||||
return QSize(24, 24);
|
||||
}
|
||||
|
||||
QWidget *ContainerItem::popupTips()
|
||||
{
|
||||
return m_popupTips;
|
||||
}
|
||||
|
@ -50,9 +50,11 @@ protected:
|
||||
void paintEvent(QPaintEvent *e);
|
||||
void mouseReleaseEvent(QMouseEvent *e);
|
||||
QSize sizeHint() const;
|
||||
QWidget *popupTips();
|
||||
|
||||
private:
|
||||
bool m_dropping;
|
||||
QLabel *m_popupTips;
|
||||
ContainerWidget *m_containerWidget;
|
||||
QPixmap m_icon;
|
||||
};
|
||||
|
@ -1,6 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1">
|
||||
<context>
|
||||
<name>ContainerItem</name>
|
||||
<message>
|
||||
<location filename="../frame/item/containeritem.cpp" line="33"/>
|
||||
<source>Click to display hidden icon</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>DatetimePlugin</name>
|
||||
<message>
|
||||
|
Loading…
x
Reference in New Issue
Block a user