Merge branch 'jxj' into 'dbus-interface'
详情页UI See merge request kylin-desktop/kylin-nm!445
This commit is contained in:
commit
4f2776fb4f
|
@ -2,6 +2,9 @@
|
|||
#define CONINFO_H
|
||||
|
||||
#include <QString>
|
||||
#include <QPalette>
|
||||
#include <QComboBox>
|
||||
#include <QAbstractItemView>
|
||||
#include "kywirelessnetitem.h"
|
||||
#include "kylinconnectresource.h"
|
||||
#include "kylinactiveconnectresource.h"
|
||||
|
@ -72,4 +75,19 @@ static void setLineEditMenuPolicy(QFrame *widget) {
|
|||
lineEditList.at(i)->setContextMenuPolicy(Qt::NoContextMenu);
|
||||
}
|
||||
}
|
||||
|
||||
static void setFramePalette(QFrame *widget, QPalette &pal) {
|
||||
QList<QLineEdit *> lineEditList = widget->findChildren<QLineEdit *>();
|
||||
for (int i = 0; i < lineEditList.count(); ++i) {
|
||||
lineEditList.at(i)->setPalette(pal);
|
||||
}
|
||||
QList<QComboBox *> comboBoxList = widget->findChildren<QComboBox *>();
|
||||
for (int i = 0; i < comboBoxList.count(); ++i) {
|
||||
comboBoxList.at(i)->setPalette(pal);
|
||||
if (comboBoxList.at(i)->view()) {
|
||||
comboBoxList.at(i)->view()->setPalette(pal);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif // CONINFO_H
|
||||
|
|
|
@ -120,6 +120,12 @@ void NetDetail::onPaletteChanged()
|
|||
|
||||
this->setPalette(pal);
|
||||
|
||||
setFramePalette(detailPage, pal);
|
||||
setFramePalette(ipv4Page, pal);
|
||||
setFramePalette(ipv6Page, pal);
|
||||
setFramePalette(securityPage, pal);
|
||||
setFramePalette(createNetPage, pal);
|
||||
|
||||
QPalette listwidget_pal(detailPage->m_listWidget->palette());
|
||||
listwidget_pal.setColor(QPalette::Base, this->palette().base().color());
|
||||
listwidget_pal.setColor(QPalette::AlternateBase, this->palette().alternateBase().color());
|
||||
|
|
Loading…
Reference in New Issue