From 8794ff00c8e77e75237e4c0391cffa26830d1122 Mon Sep 17 00:00:00 2001 From: renpeijia Date: Fri, 10 Dec 2021 09:51:44 +0800 Subject: [PATCH] bug#90711 devicecomboBox color --- src/frontend/tab-pages/tabpage.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/frontend/tab-pages/tabpage.cpp b/src/frontend/tab-pages/tabpage.cpp index aefb306c..f4a1eabd 100644 --- a/src/frontend/tab-pages/tabpage.cpp +++ b/src/frontend/tab-pages/tabpage.cpp @@ -48,6 +48,13 @@ void TabPage::initUI() m_deviceLabel->setText(tr("Current Device")); m_deviceComboBox = new QComboBox(m_deviceFrame); m_deviceComboBox->setFixedWidth(DEVICE_COMBOBOX_WIDTH); + if (m_deviceComboBox->view()) { + QPalette view_pal = m_deviceComboBox->view()->palette(); + QColor view_color = m_deviceComboBox->palette().color(QPalette::Active, QPalette::Button); + view_pal.setColor(QPalette::Base, view_color); + m_deviceComboBox->setPalette(view_pal); + m_deviceComboBox->view()->setPalette(view_pal); + } m_tipsLabel = new QLabel(m_deviceFrame); m_tipsLabel->setText(tr("Devices Closed!")); m_deviceLayout->addWidget(m_deviceLabel);