complete the adaptation for QTreeView

This commit is contained in:
李柯 2024-11-13 10:51:06 +08:00
parent 843f483da1
commit 711525f2a8
1 changed files with 14 additions and 14 deletions

View File

@ -2478,7 +2478,7 @@ void UKUIConfigStyleParameters::getHighlightModeConfigListParameters(ConfigListP
void UKUIConfigStyleParameters::initConfigTreeParameters(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;
if (widget && widget->property("highlightMode").isValid()) {
@ -2489,24 +2489,24 @@ void UKUIConfigStyleParameters::initConfigTreeParameters(bool isDark, const QSty
UKUIColorTheme::TreeViewColorCfg treeViewColorCfg = readCfg()->treeViewColorCfg(palette,
highlightMode ? C_TreeView_HighLight : C_TreeView_Default);
QBrush defaultBrush = treeViewColorCfg.defaultBrush;
QBrush hoverBrush = treeViewColorCfg.hoverBrush;
QBrush selectBrush = treeViewColorCfg.selectBrush;
QBrush disableBrush = treeViewColorCfg.disableBrush;
QPen textHoverPen = QPen(treeViewColorCfg.textHoverPen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin);
QPen textSelectPen = QPen(treeViewColorCfg.textSelectPen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin);
QPen textDisablePen = QPen(treeViewColorCfg.textDisablePen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin);
QPen hoverPen = QPen(treeViewColorCfg.hoverPen, (treeViewColorCfg.hoverPen == Qt::NoPen || treeViewColorCfg.hoverPen.alpha() == 0)
QBrush defaultBrush = m_dtconfig->baseActive();
QBrush hoverBrush = m_dtconfig->kContainHover();
QBrush selectBrush = m_dtconfig->kContainClick();
QBrush disableBrush = m_dtconfig->baseActive();
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->kFontSecondaryDisable(), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin);
QPen hoverPen = QPen(m_dtconfig->kContainHover(), (m_dtconfig->kContainHover() == Qt::NoPen || m_dtconfig->kContainHover().alpha() == 0)
? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin);
QPen selectPen = QPen(treeViewColorCfg.selectPen, (treeViewColorCfg.selectPen == Qt::NoPen || treeViewColorCfg.selectPen.alpha() == 0)
QPen selectPen = QPen(m_dtconfig->kContainClick(), (m_dtconfig->kContainClick() == Qt::NoPen || m_dtconfig->kContainClick().alpha() == 0)
? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin);
QPen focusPen = QPen(treeViewColorCfg.focusPen, (treeViewColorCfg.focusPen == Qt::NoPen || treeViewColorCfg.focusPen.alpha() == 0)
? 0 : 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin);
QBrush branchDefaultBrush = treeViewColorCfg.branchDefaultBrush;
QBrush branchHoverBrush = treeViewColorCfg.branchHoverBrush;
QBrush branchSelectBrush = treeViewColorCfg.branchSelectBrush;
QBrush branchDisableBrush = treeViewColorCfg.branchDisableBrush;
QBrush branchDefaultBrush = m_dtconfig->baseActive();
QBrush branchHoverBrush = m_dtconfig->kContainClick();
QBrush branchSelectBrush = m_dtconfig->kContainHover();
QBrush branchDisableBrush = m_dtconfig->baseActive();
branchHoverBrush = hoverBrush;
switch (m_adjustColorRules) {