qmenu启典图标需要反白

This commit is contained in:
tanjing 2023-11-17 16:27:15 +08:00
parent 93dd094cbc
commit 408ade7a5c
1 changed files with 9 additions and 9 deletions

View File

@ -5388,9 +5388,9 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp
QIcon::Mode mode = enable ? QIcon::Active : QIcon::Disabled;
QPixmap pixmap = icon.pixmap(iconWidth, iconWidth, mode , QIcon::On);
QPixmap drawPixmap;
if(!isComboBox && !sp->indicatorIconHoverNeedHighLight)
drawPixmap = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget);
else
// if(!isComboBox && !sp->indicatorIconHoverNeedHighLight)
// drawPixmap = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget);
// else
drawPixmap = HighLightEffect::bothOrdinaryAndHoverGeneratePixmap(pixmap, option, widget);
QRect iconRect(drawRect.x(), drawRect.y() + (drawRect.height() - iconWidth) / 2, iconWidth, iconWidth);
@ -5409,9 +5409,9 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp
QIcon::Mode mode = enable ? (selected ? QIcon::Active : QIcon::Normal) : QIcon::Disabled;
QPixmap pixmap = icon.pixmap(iconWidth, iconWidth, mode , QIcon::On);
QPixmap drawPixmap;
if(!isComboBox && !sp->indicatorIconHoverNeedHighLight)
drawPixmap = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget);
else
// if(!isComboBox && !sp->indicatorIconHoverNeedHighLight)
// drawPixmap = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget);
// else
drawPixmap = HighLightEffect::bothOrdinaryAndHoverGeneratePixmap(pixmap, option, widget);
QRect iconRect(drawRect.x(), drawRect.y() + (drawRect.height() - iconWidth) / 2, iconWidth, iconWidth);
@ -5488,9 +5488,9 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp
QPixmap pixmap = menuItem->icon.pixmap(iconSize, mode, state);
pixmap = proxy()->generatedIconPixmap(mode, pixmap, option);
QPixmap target;
if(!isComboBox && !sp->indicatorIconHoverNeedHighLight)
target = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget);
else
// if(!isComboBox && !sp->indicatorIconHoverNeedHighLight)
// target = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget);
// else
target = HighLightEffect::bothOrdinaryAndHoverGeneratePixmap(pixmap, option, widget);