From 84eb6a0ee0de3eb2037586787ea46a8b481aeb70 Mon Sep 17 00:00:00 2001 From: qiuchangxing Date: Thu, 29 Apr 2021 15:17:03 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=93=9D=E7=89=99?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E5=AD=97=E4=BD=93=E9=A2=9C=E8=89=B2=E6=9C=AA?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E9=AB=98=E4=BA=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 蓝牙列表字体颜色未设置高亮,对应控件设置字体颜色为高亮即可 Log: 修复蓝牙列表字体颜色未设置高亮 Bug: https://pms.uniontech.com/zentao/bug-view-77248.html Change-Id: Ib1874e0d20e57e190ae02197eb15192bf9e67045 --- plugins/bluetooth/componments/bluetoothadapteritem.cpp | 1 + plugins/bluetooth/componments/bluetoothapplet.cpp | 3 +++ 2 files changed, 4 insertions(+) diff --git a/plugins/bluetooth/componments/bluetoothadapteritem.cpp b/plugins/bluetooth/componments/bluetoothadapteritem.cpp index d2124109f..88c289a2e 100644 --- a/plugins/bluetooth/componments/bluetoothadapteritem.cpp +++ b/plugins/bluetooth/componments/bluetoothadapteritem.cpp @@ -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()); diff --git a/plugins/bluetooth/componments/bluetoothapplet.cpp b/plugins/bluetooth/componments/bluetoothapplet.cpp index 71ada4098..a5fd6ea3e 100644 --- a/plugins/bluetooth/componments/bluetoothapplet.cpp +++ b/plugins/bluetooth/componments/bluetoothapplet.cpp @@ -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);