fix: 修复蓝牙列表字体颜色未设置高亮

蓝牙列表字体颜色未设置高亮,对应控件设置字体颜色为高亮即可

Log: 修复蓝牙列表字体颜色未设置高亮
Bug: https://pms.uniontech.com/zentao/bug-view-77248.html
Change-Id: Ib1874e0d20e57e190ae02197eb15192bf9e67045
This commit is contained in:
qiuchangxing 2021-04-29 15:17:03 +09:00
parent deeb523fea
commit 84eb6a0ee0
2 changed files with 4 additions and 0 deletions

View File

@ -66,6 +66,7 @@ void BluetoothDeviceItem::initActionList()
m_standarditem->setActionList(Qt::RightEdge, {m_stateAction});
m_standarditem->setActionList(Qt::LeftEdge, {m_labelAction});
m_labelAction->setTextColorRole(DPalette::BrightText);
m_labelAction->setText(m_device->alias());
updateDeviceState(m_device->state());
updateIconTheme(DGuiApplicationHelper::instance()->themeType());

View File

@ -45,6 +45,9 @@ SettingLabel::SettingLabel(QString text, QWidget *parent)
, m_label(new DLabel(text, this))
, m_layout(new QHBoxLayout(this))
{
QPalette palette;
palette.setColor(QPalette::WindowText, QPalette::BrightText);
m_label->setPalette(palette);
setAccessibleName("BluetoothSettingLabel");
setContentsMargins(0, 0, 0, 0);
m_layout->setMargin(0);