issues#I8XJF0 I8XJ84 Tooltip menu圆角响应窗口圆角,toolbutton文字颜色checked模式下修正

This commit is contained in:
tanjing 2024-01-26 16:04:14 +08:00
parent 365a930adf
commit 5cbd96d9be
1 changed files with 11 additions and 1 deletions

View File

@ -1431,7 +1431,7 @@ void UKUIConfigStyleParameters::initConfigToolButtonLabelParameters(bool isDark,
if (isImportant)
buttonColorCfg = readCfg()->toolButtonColorCfg(option->palette, C_Button_ImportButton);
if(option->state & QStyle::State_On | QStyle::State_Enabled){
if(option->state & QStyle::State_On && option->state & QStyle::State_Enabled){
buttonColorCfg = readCfg()->toolButtonColorCfg(option->palette, C_Button_ImportButton);
}
@ -2740,6 +2740,7 @@ void UKUIConfigStyleParameters::initConfigRadioButtonParameters(bool isDark, con
QBrush childrenOnClickBrush = radioButtonColorCfg.childrenOnClickBrush;
QBrush childrenOnDisableBrush = radioButtonColorCfg.childrenOnDisableBrush;
QBrush onHoverBrush = QBrush(radioButtonColorCfg.onHoverBrush);
if (radioButtonColorCfg.onHoverType == Obj_Gradient_Type) {
QLinearGradient linearGradient;
linearGradient.setStart(option->rect.topLeft());
@ -3469,6 +3470,10 @@ void UKUIConfigStyleParameters::initConfigToolTipParameters(bool isDark, const Q
int radius = (widget && widget->property("normalRadius").isValid()) ?
widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius;
auto settings = UKUIStyleSettings::globalInstance();
if(settings && settings->keys().contains("windowRadius"))
radius = settings->get("windowRadius").toInt();
if (widget) {
if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) {
radius = widget->property("setRadius").value<int>();
@ -3631,6 +3636,11 @@ void UKUIConfigStyleParameters::initConfigMenuParameters(bool isDark, const QSty
{
int frameradius = (widget && widget->property("maxRadius").isValid()) ?
widget->property("maxRadius").toInt() : m_radiusStruct.maxRadius;
auto settings = UKUIStyleSettings::globalInstance();
if(settings && settings->keys().contains("windowRadius"))
frameradius = settings->get("windowRadius").toInt();
int itemradius = (widget && widget->property("normalRadius").isValid()) ?
widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius;
// QPixmap framePixmap(option->rect.size());