complete the adaptation for QTabel

This commit is contained in:
李柯 2024-11-12 17:42:56 +08:00
parent 6c1abd7bfe
commit 843f483da1
1 changed files with 11 additions and 11 deletions

View File

@ -2685,7 +2685,7 @@ void UKUIConfigStyleParameters::getHighlightModeConfigTreeParameters(ConfigTreeP
void UKUIConfigStyleParameters::initConfigTableParameters(bool isDark, const QStyleOption *option, const QWidget *widget, bool highlight)
{
int radius = (widget && widget->property("normalRadius").isValid()) ?
widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius;
widget->property("normalRadius").toInt() : m_dtconfig->kradiusNormal();
bool highlightMode = highlight;
@ -2697,18 +2697,18 @@ void UKUIConfigStyleParameters::initConfigTableParameters(bool isDark, const QSt
UKUIColorTheme::TableColorCfg tableColorCfg = readCfg()->tableColorCfg(palette,
highlightMode ? C_Table_Highlight : C_Table_Default);
QBrush defaultBrush = tableColorCfg.defaultBrush;
QBrush hoverBrush = QBrush(tableColorCfg.hoverBrush);
QBrush selectBrush = tableColorCfg.selectBrush;
QBrush disableBrush = tableColorCfg.disableBrush;
QPen hoverPen = QPen(tableColorCfg.hoverPen, (tableColorCfg.hoverPen.alpha() == 0 || tableColorCfg.hoverPen == Qt::NoPen)
QBrush defaultBrush = m_dtconfig->baseActive();
QBrush hoverBrush = m_dtconfig->kComponentHover();
QBrush selectBrush = m_dtconfig->kComponentClick();
QBrush disableBrush = m_dtconfig->baseActive();
QPen hoverPen = QPen(m_dtconfig->kLineComponentHover(), (m_dtconfig->kLineComponentHover().alpha() == 0 || m_dtconfig->kLineComponentHover() == Qt::NoPen)
? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin);
QPen selectPen = QPen(tableColorCfg.selectPen, (tableColorCfg.selectPen.alpha() == 0 || tableColorCfg.selectPen == Qt::NoPen)
QPen selectPen = QPen(m_dtconfig->kLineComponentClick(), (m_dtconfig->kLineComponentClick().alpha() == 0 || m_dtconfig->kLineComponentClick() == Qt::NoPen)
? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin);
QPen textHoverPen = QPen(tableColorCfg.textHoverPen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin);
QPen textSelectPen = QPen(tableColorCfg.textSelectPen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin);
QPen textDisablePen = QPen(tableColorCfg.textDisablePen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin);
QPen focusPen = QPen(tableColorCfg.focusPen, (tableColorCfg.focusPen.alpha() == 0 || tableColorCfg.focusPen == Qt::NoPen)
QPen textHoverPen = QPen(m_dtconfig->kFontPrimary(), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin);
QPen textSelectPen = QPen(m_dtconfig->kFontPrimary(), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin);
QPen textDisablePen = QPen(m_dtconfig->kFontPrimaryDisable(), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin);
QPen focusPen = QPen(m_dtconfig->kFontPrimary(), (m_dtconfig->kFontPrimary().alpha() == 0 || m_dtconfig->kFontPrimary() == Qt::NoPen)
? 0 : 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin);
switch (m_adjustColorRules) {