Merge branch 'y2209bug' into 'dbus-interface'

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

See merge request kylin-desktop/kylin-nm!722
This commit is contained in:
赵世旭 2022-10-10 03:11:59 +00:00
commit 3af0ff9eac
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,12 +33,14 @@ FixLabel::FixLabel(QWidget *parent) :
{
const QByteArray id("org.ukui.style");
QGSettings * fontSetting = new QGSettings(id, QByteArray(), this);
if(QGSettings::isSchemaInstalled(id)){
connect(fontSetting, &QGSettings::changed,[=](QString key) {
if ("systemFont" == key || "systemFontSize" ==key) {
changedLabelSlot();
}
});
}
}
void FixLabel::setLabelText(QString text) {

View File

@ -454,7 +454,8 @@ void NetDetail::initComponent()
setSecuPageHeight();
});
const QByteArray id("org.ukui.style");
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) {
@ -462,6 +463,7 @@ void NetDetail::initComponent()
}
});
}
}
void NetDetail::pagePadding(QString netName, bool isWlan)
{