forked from openkylin/qt5-ukui-platformtheme
只留窗口圆角的gsettings
This commit is contained in:
parent
55975ef73f
commit
49ec6447fc
|
@ -92,15 +92,5 @@
|
|||
<summary>Window Radius</summary>
|
||||
<description>Set the rounded corner size of the window</description>
|
||||
</key>
|
||||
<key type="i" name="normal-radius">
|
||||
<default>6</default>
|
||||
<summary>Normal Radius</summary>
|
||||
<description>Setting this normal fillet value can uniformly modify the fillet values of all normal fillet controls</description>
|
||||
</key>
|
||||
<key type="i" name="min-radius">
|
||||
<default>4</default>
|
||||
<summary>Min Radius</summary>
|
||||
<description>Setting this small rounded value can uniformly modify the rounded values of all small rounded controls</description>
|
||||
</key>
|
||||
</schema>
|
||||
</schemalist>
|
||||
|
|
|
@ -70,19 +70,19 @@ UKUIStylePlugin::UKUIStylePlugin(QObject *parent) :
|
|||
}
|
||||
qApp->setStyle(new UKUIConfigStyle(styleName));
|
||||
|
||||
if(key == "widgetThemeName" || key == "widget-theme-name"){
|
||||
qDebug() << "qApp style....." << qApp->style();
|
||||
auto configStyle = qobject_cast<UKUIConfigStyle *>(qApp->style());
|
||||
if(configStyle){
|
||||
int max, normal, min;
|
||||
max = configStyle->property("windowRadius").isValid() ? configStyle->property("windowRadius").toInt() : settings->get("windowRadius").toInt();
|
||||
normal = configStyle->property("normalRadius").isValid() ? configStyle->property("normalRadius").toInt() : settings->get("normalRadius").toInt();
|
||||
min = configStyle->property("minRadius").isValid() ? configStyle->property("minRadius").toInt() : settings->get("minRadius").toInt();
|
||||
settings->trySet("max-radius", max);
|
||||
settings->trySet("normal-radius", normal);
|
||||
settings->trySet("min-radius", min);
|
||||
}
|
||||
}
|
||||
// if(key == "widgetThemeName" || key == "widget-theme-name"){
|
||||
// qDebug() << "qApp style....." << qApp->style();
|
||||
// auto configStyle = qobject_cast<UKUIConfigStyle *>(qApp->style());
|
||||
// if(configStyle){
|
||||
// int max, normal, min;
|
||||
// max = configStyle->property("windowRadius").isValid() ? configStyle->property("windowRadius").toInt() : settings->get("windowRadius").toInt();
|
||||
// normal = configStyle->property("normalRadius").isValid() ? configStyle->property("normalRadius").toInt() : settings->get("normalRadius").toInt();
|
||||
// min = configStyle->property("minRadius").isValid() ? configStyle->property("minRadius").toInt() : settings->get("minRadius").toInt();
|
||||
// settings->trySet("max-radius", max);
|
||||
// settings->trySet("normal-radius", normal);
|
||||
// settings->trySet("min-radius", min);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
return;
|
||||
|
@ -109,7 +109,8 @@ UKUIStylePlugin::UKUIStylePlugin(QObject *parent) :
|
|||
onSystemPaletteChanged();
|
||||
}
|
||||
|
||||
if(key == "max-radius" || key == "windowRadius"){
|
||||
/*
|
||||
if(key == "window-radius" || key == "windowRadius"){
|
||||
auto radius = settings->get("windowRadius").toInt();
|
||||
foreach (QWidget *widget, qApp->allWidgets()) {
|
||||
widget->setProperty("windowRadius", radius);
|
||||
|
@ -131,6 +132,7 @@ UKUIStylePlugin::UKUIStylePlugin(QObject *parent) :
|
|||
widget->repaint();
|
||||
}
|
||||
}
|
||||
*/
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue