修改qmenu、combobox下拉框的阴影圆角

This commit is contained in:
tanjing 2024-01-31 14:03:17 +08:00
parent 15cfe366fe
commit 09e86432f1
1 changed files with 2 additions and 2 deletions

View File

@ -158,7 +158,7 @@ QPixmap ConfigShadowHelper::getShadowPixmap(QColor color, /*ConfigShadowHelper::
int qAppMaxradius = maxRadius;
if(widget){
if(qobject_cast<QMenu *>(widget)){
if(widget->inherits("QComboBoxPrivateContainer") || widget->inherits("QMenu")){
auto settings = UKUIStyleSettings::globalInstance();
if(settings && settings->keys().contains("windowRadius"))
qAppMaxradius = settings->get("windowRadius").toInt();
@ -268,7 +268,7 @@ QPainterPath ConfigShadowHelper::caculateRelativePainterPath(QWidget *widget, qr
int qAppMaxradius = maxRadius;
if(widget){
if(qobject_cast<QMenu *>(widget)){
if(widget->inherits("QComboBoxPrivateContainer") || widget->inherits("QMenu")){
auto settings = UKUIStyleSettings::globalInstance();
if(settings && settings->keys().contains("windowRadius"))
qAppMaxradius = settings->get("windowRadius").toInt();