combobox下拉菜单不需要透明度

This commit is contained in:
tanjing 2023-10-13 10:24:35 +08:00
parent f77d6bbc77
commit 87c10a0e78
4 changed files with 7 additions and 6 deletions

View File

@ -304,7 +304,7 @@
"OnHoverPen" : {"value": "0, 0, 0, 0.1", "type": "color"},
"OnClickPen" : {"value": "0, 0, 0, 0.1", "type": "color"},
"ContentPen" : {"value": "HighLightText_at", "type": "paletterole"},
"DefaultBrush" : {"value": "NoRole_dis", "type": "paletterole"},
"DefaultBrush" : {"value": "255, 255, 255", "type": "color"},
"HoverBrush" : {"type": "color"},
"OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"},
"OnHoverBrush" : { "type": "color"},

View File

@ -322,6 +322,7 @@
"RadioButton":{
"DefaultRadioButton":{
"DefaultPen" : {"value": "140, 140, 140", "type": "color"},
"DisablePen" : {"value": "166, 166, 166", "type": "color"},
"OnDefaultPen" : {"value": "83, 80, 171", "type": "color"},
"DefaultBrush" : {"value": "Base_at", "type": "paletterole"},
"HoverBrush" : { "type": "color"},
@ -727,6 +728,7 @@
"RadioButton":{
"DefaultRadioButton":{
"DefaultPen" : {"value": "140, 140, 140", "type": "color"},
"DisablePen" : {"value": "255, 255, 255, 0.15", "type": "color"},
"OnDefaultPen" : {"value": "160, 157, 248", "type": "color"},
"DefaultBrush" : {"value": "Button_at", "type": "paletterole"},
"OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"},

View File

@ -2854,9 +2854,6 @@ void UKUIConfigStyleParameters::initConfigRadioButtonParameters(bool isDark, con
clickBrush = QBrush(configMixColor(defaultBrush.color(), mix, 0.15));
}
//disable
disablePen = defaultPen;
onHoverPen = onDefaultPen;
if(radioButtonColorCfg.onHoverType == Obj_Color_Type){
//on hover
@ -2865,6 +2862,8 @@ void UKUIConfigStyleParameters::initConfigRadioButtonParameters(bool isDark, con
} else {
onHoverBrush = QBrush(configMixColor(onDefaultBrush.color(), mix, 0.05));
}
//disable
disablePen = defaultPen;
}
else if(radioButtonColorCfg.onHoverType == Obj_Gradient_Type){
QColor startColor;
@ -3692,7 +3691,7 @@ void UKUIConfigStyleParameters::initConfigMenuParameters(bool isDark, const QSty
}
auto color = menuColorCfg.menuBackgroundBrush;
if (UKUIStyleSettings::isSchemaInstalled("org.ukui.style")) {
if (!widget->inherits("QComboBoxPrivateContainer") && UKUIStyleSettings::isSchemaInstalled("org.ukui.style")) {
auto opacity = UKUIStyleSettings::globalInstance()->get("menuTransparency").toInt()/100.0;
color.setAlphaF(opacity);
}

View File

@ -894,7 +894,7 @@ UKUIColorTheme::TableColorCfg ReadThemeConfig::tableColorCfg(const QPalette pale
m_tableColorCfg.hoverGradientList.clear();
m_readConfig->getGradientValue(m_tableColorCfg.hoverGradientList , m_theme, UKUITable, property, C_Table_HoverBrush);
}
else if(m_tableColorCfg.hoverType == Obj_Color_Type){
else{
m_readConfig->getColorValue(m_tableColorCfg.hoverBrush, m_theme, UKUITable, property, C_Table_HoverBrush);
}
return m_tableColorCfg;