格式修改

This commit is contained in:
kangshuning 2021-12-30 10:04:47 +08:00
parent 5c65f62860
commit 6cc2e731eb
1 changed files with 5 additions and 2 deletions

View File

@ -116,11 +116,12 @@ void SwitchButton::enterEvent(QEvent *event)
{
if (m_enabled && m_bIsOn) {
m_colorActive = COLOR_ACTIVE_HOVER;
}
else if (m_enabled && !m_bIsOn) {
} else if (m_enabled && !m_bIsOn) {
m_colorInactive = COLOR_INACTIVE_HOVER;
}
this->update();
return QWidget::enterEvent(event);
}
@ -131,7 +132,9 @@ void SwitchButton::leaveEvent(QEvent *event)
} else if (m_enabled && !m_bIsOn) {
m_colorInactive = COLOR_INACTIVE;
}
this->update();
return QWidget::leaveEvent(event);
}