power status tips not display

Change-Id: Ibadfc396869268ec738d023b1fb7e85d88c94799
This commit is contained in:
石博文 2016-09-05 13:57:22 +08:00
parent 4db7d1626d
commit df0d9d1147
Notes: Deepin Code Review 2016-09-05 06:08:54 +00:00
Verified+1: Anonymous Coward #1000004
Verified+1: <zhaofangfang@linuxdeepin.com>
Code-Review+2: 石博文 <sbw@sbw.so>
Submitted-by: 石博文 <sbw@sbw.so>
Submitted-at: Mon, 05 Sep 2016 06:08:54 +0000
Reviewed-on: https://cr.deepin.io/15843
Project: dde/dde-dock
Branch: refs/heads/master

View File

@ -42,7 +42,7 @@ QWidget *ShutdownPlugin::itemTipsWidget(const QString &itemKey)
{
const BatteryPercentageMap data = m_powerInter->batteryPercentage();
if (itemKey == SHUTDOWN_KEY || data.isEmpty())
if (data.isEmpty() || (itemKey == SHUTDOWN_KEY && displayMode() == Dock::Efficient))
{
m_tipsLabel->setText(tr("Shut down"));
return m_tipsLabel;