Merge branch '2209bug-tray' into 'yhkylin/v101'
fix bug 网络名称和按钮显示重叠 名称显示异常问题 See merge request kylinos-src/kylin-nm!111
This commit is contained in:
commit
399cf12d25
|
@ -219,10 +219,8 @@ void LanListItem::updateConnectionState(ConnectState state)
|
||||||
m_netButton->stopLoading();
|
m_netButton->stopLoading();
|
||||||
if (state == Activated) {
|
if (state == Activated) {
|
||||||
setIcon(true);
|
setIcon(true);
|
||||||
m_nameLabel->setLabelMaximumWidth(NAMELABLE_MAX_WIDTH_ACTIVATED);
|
|
||||||
} else {
|
} else {
|
||||||
setIcon(false);
|
setIcon(false);
|
||||||
m_nameLabel->setLabelMaximumWidth(NAMELABLE_MAX_WIDTH_DEACTIVATED);
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
m_netButton->startLoading();
|
m_netButton->startLoading();
|
||||||
|
@ -284,7 +282,7 @@ void LanListItem::leaveEvent(QEvent *event)
|
||||||
m_lbLoadDown->show();
|
m_lbLoadDown->show();
|
||||||
m_lbLoadDownImg->show();
|
m_lbLoadDownImg->show();
|
||||||
m_lbLoadUpImg->show();
|
m_lbLoadUpImg->show();
|
||||||
} else if (m_lanConnectItem.m_connectState == Deactivated) {
|
} else {
|
||||||
m_nameLabel->setLabelMaximumWidth(NAMELABLE_MAX_WIDTH_DEACTIVATED);
|
m_nameLabel->setLabelMaximumWidth(NAMELABLE_MAX_WIDTH_DEACTIVATED);
|
||||||
}
|
}
|
||||||
return ListItem::leaveEvent(event);
|
return ListItem::leaveEvent(event);
|
||||||
|
|
|
@ -229,7 +229,7 @@ void WlanListItem::leaveEvent(QEvent *event)
|
||||||
m_lbLoadDown->show();
|
m_lbLoadDown->show();
|
||||||
m_lbLoadDownImg->show();
|
m_lbLoadDownImg->show();
|
||||||
m_lbLoadUpImg->show();
|
m_lbLoadUpImg->show();
|
||||||
} else if (m_connectState == Deactivated) {
|
} else {
|
||||||
m_nameLabel->setLabelMaximumWidth(NAMELABLE_MAX_WIDTH_DEACTIVATED);
|
m_nameLabel->setLabelMaximumWidth(NAMELABLE_MAX_WIDTH_DEACTIVATED);
|
||||||
}
|
}
|
||||||
if (m_pwdFrame && m_pwdFrame->isVisible()) {
|
if (m_pwdFrame && m_pwdFrame->isVisible()) {
|
||||||
|
@ -661,7 +661,9 @@ void WlanListItem::updateConnectState(ConnectState state)
|
||||||
m_hoverButton->setProperty("useButtonPalette", true);
|
m_hoverButton->setProperty("useButtonPalette", true);
|
||||||
m_hoverButton->setProperty("isImportant", false);
|
m_hoverButton->setProperty("isImportant", false);
|
||||||
m_hoverButton->setButtonText(tr("Disconnect"));
|
m_hoverButton->setButtonText(tr("Disconnect"));
|
||||||
m_nameLabel->setLabelMaximumWidth(NAMELABLE_MAX_WIDTH_ACTIVATED);
|
if (m_hoverButton->isHidden()) {
|
||||||
|
m_nameLabel->setLabelMaximumWidth(NAMELABLE_MAX_WIDTH_ACTIVATED);
|
||||||
|
}
|
||||||
} else if(Deactivated == state) {
|
} else if(Deactivated == state) {
|
||||||
qDebug() << "[WlanListItem] stop loading connect state:" << state;
|
qDebug() << "[WlanListItem] stop loading connect state:" << state;
|
||||||
m_netButton->stopLoading();
|
m_netButton->stopLoading();
|
||||||
|
@ -669,7 +671,9 @@ void WlanListItem::updateConnectState(ConnectState state)
|
||||||
m_hoverButton->setProperty("isImportant", true);
|
m_hoverButton->setProperty("isImportant", true);
|
||||||
m_hoverButton->setProperty("useButtonPalette", false);
|
m_hoverButton->setProperty("useButtonPalette", false);
|
||||||
m_hoverButton->setButtonText(tr("Connect"));
|
m_hoverButton->setButtonText(tr("Connect"));
|
||||||
m_nameLabel->setLabelMaximumWidth(NAMELABLE_MAX_WIDTH_DEACTIVATED);
|
if (m_hoverButton->isHidden()) {
|
||||||
|
m_nameLabel->setLabelMaximumWidth(NAMELABLE_MAX_WIDTH_DEACTIVATED);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
qDebug() << "[WlanListItem] start loading connect state:" << state;
|
qDebug() << "[WlanListItem] start loading connect state:" << state;
|
||||||
m_netButton->startLoading();
|
m_netButton->startLoading();
|
||||||
|
|
Loading…
Reference in New Issue