QGSettingsa判空 设置托盘内圆角半径

This commit is contained in:
zhangyuanyuan1 2022-10-09 16:12:28 +08:00
parent 311ef6aa13
commit 0c893731c6
3 changed files with 17 additions and 12 deletions

View File

@ -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);

View File

@ -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();
}
});
}
}

View File

@ -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)