From 87c10a0e788da2a8f935a5d349d7d74943bd5aa0 Mon Sep 17 00:00:00 2001 From: tanjing Date: Fri, 13 Oct 2023 10:24:35 +0800 Subject: [PATCH] =?UTF-8?q?combobox=E4=B8=8B=E6=8B=89=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E4=B8=8D=E9=9C=80=E8=A6=81=E9=80=8F=E6=98=8E=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../themeconfig/UKUIConfigDefault.json | 2 +- .../themeconfig/UKUIConfigFashion.json | 2 ++ .../qt5-config-style-ukui/ukui-config-style-parameters.cpp | 7 +++---- ukui-styles/readconfig.cpp | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ukui-styles/qt5-config-style-ukui/themeconfig/UKUIConfigDefault.json b/ukui-styles/qt5-config-style-ukui/themeconfig/UKUIConfigDefault.json index c99d47f..ed9e456 100644 --- a/ukui-styles/qt5-config-style-ukui/themeconfig/UKUIConfigDefault.json +++ b/ukui-styles/qt5-config-style-ukui/themeconfig/UKUIConfigDefault.json @@ -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"}, diff --git a/ukui-styles/qt5-config-style-ukui/themeconfig/UKUIConfigFashion.json b/ukui-styles/qt5-config-style-ukui/themeconfig/UKUIConfigFashion.json index 0148840..d6c2381 100644 --- a/ukui-styles/qt5-config-style-ukui/themeconfig/UKUIConfigFashion.json +++ b/ukui-styles/qt5-config-style-ukui/themeconfig/UKUIConfigFashion.json @@ -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"}, diff --git a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp index 8393924..b76ac1e 100644 --- a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp +++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp @@ -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); } diff --git a/ukui-styles/readconfig.cpp b/ukui-styles/readconfig.cpp index 81842a9..29373c1 100644 --- a/ukui-styles/readconfig.cpp +++ b/ukui-styles/readconfig.cpp @@ -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;