forked from openkylin/qt5-ukui-platformtheme
修改qmenu、combobox下拉框的阴影圆角
This commit is contained in:
parent
15cfe366fe
commit
09e86432f1
|
@ -158,7 +158,7 @@ QPixmap ConfigShadowHelper::getShadowPixmap(QColor color, /*ConfigShadowHelper::
|
||||||
|
|
||||||
int qAppMaxradius = maxRadius;
|
int qAppMaxradius = maxRadius;
|
||||||
if(widget){
|
if(widget){
|
||||||
if(qobject_cast<QMenu *>(widget)){
|
if(widget->inherits("QComboBoxPrivateContainer") || widget->inherits("QMenu")){
|
||||||
auto settings = UKUIStyleSettings::globalInstance();
|
auto settings = UKUIStyleSettings::globalInstance();
|
||||||
if(settings && settings->keys().contains("windowRadius"))
|
if(settings && settings->keys().contains("windowRadius"))
|
||||||
qAppMaxradius = settings->get("windowRadius").toInt();
|
qAppMaxradius = settings->get("windowRadius").toInt();
|
||||||
|
@ -268,7 +268,7 @@ QPainterPath ConfigShadowHelper::caculateRelativePainterPath(QWidget *widget, qr
|
||||||
|
|
||||||
int qAppMaxradius = maxRadius;
|
int qAppMaxradius = maxRadius;
|
||||||
if(widget){
|
if(widget){
|
||||||
if(qobject_cast<QMenu *>(widget)){
|
if(widget->inherits("QComboBoxPrivateContainer") || widget->inherits("QMenu")){
|
||||||
auto settings = UKUIStyleSettings::globalInstance();
|
auto settings = UKUIStyleSettings::globalInstance();
|
||||||
if(settings && settings->keys().contains("windowRadius"))
|
if(settings && settings->keys().contains("windowRadius"))
|
||||||
qAppMaxradius = settings->get("windowRadius").toInt();
|
qAppMaxradius = settings->get("windowRadius").toInt();
|
||||||
|
|
Loading…
Reference in New Issue