QGSettingsa判空 设置托盘内圆角半径
This commit is contained in:
parent
311ef6aa13
commit
0c893731c6
|
@ -261,6 +261,7 @@ void MainWindow::initUI()
|
|||
m_centralWidget = new QTabWidget(this);
|
||||
this->setCentralWidget(m_centralWidget);
|
||||
m_centralWidget->tabBar()->setFixedWidth(this->width()+1);
|
||||
m_centralWidget->tabBar()->setProperty("setRadius", 12);
|
||||
// m_centralWidget->tabBar()->setStyleSheet("QTabBar::tab{min-height:40px}");
|
||||
m_lanWidget = new LanPage(m_centralWidget);
|
||||
m_wlanWidget = new WlanPage(m_centralWidget);
|
||||
|
|
|
@ -33,11 +33,13 @@ FixLabel::FixLabel(QWidget *parent) :
|
|||
{
|
||||
const QByteArray id("org.ukui.style");
|
||||
QGSettings * fontSetting = new QGSettings(id, QByteArray(), this);
|
||||
connect(fontSetting, &QGSettings::changed,[=](QString key) {
|
||||
if ("systemFont" == key || "systemFontSize" ==key) {
|
||||
changedLabelSlot();
|
||||
}
|
||||
});
|
||||
if(QGSettings::isSchemaInstalled(id)){
|
||||
connect(fontSetting, &QGSettings::changed,[=](QString key) {
|
||||
if ("systemFont" == key || "systemFontSize" ==key) {
|
||||
changedLabelSlot();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -454,13 +454,15 @@ void NetDetail::initComponent()
|
|||
setSecuPageHeight();
|
||||
});
|
||||
|
||||
const QByteArray id("org.ukui.style");
|
||||
QGSettings * fontSetting = new QGSettings(id, QByteArray(), this);
|
||||
connect(fontSetting, &QGSettings::changed,[=](QString key) {
|
||||
if ("systemFont" == key || "systemFontSize" ==key) {
|
||||
setNetTabToolTip();
|
||||
}
|
||||
});
|
||||
const QByteArray id(THEME_SCHAME);
|
||||
if(QGSettings::isSchemaInstalled(id)){
|
||||
QGSettings * fontSetting = new QGSettings(id, QByteArray(), this);
|
||||
connect(fontSetting, &QGSettings::changed,[=](QString key) {
|
||||
if ("systemFont" == key || "systemFontSize" ==key) {
|
||||
setNetTabToolTip();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
void NetDetail::pagePadding(QString netName, bool isWlan)
|
||||
|
|
Loading…
Reference in New Issue