|
|
@ -120,14 +120,17 @@ void DelegateButton::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) |
|
|
|
|
|
|
|
|
|
|
|
void DelegateButton::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) |
|
|
|
void DelegateButton::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
painter->save(); |
|
|
|
|
|
|
|
painter->setCompositionMode(QPainter::CompositionMode_SourceOver); |
|
|
|
QGraphicsSvgItem::paint(painter, option, widget); |
|
|
|
QGraphicsSvgItem::paint(painter, option, widget); |
|
|
|
|
|
|
|
painter->restore(); |
|
|
|
|
|
|
|
|
|
|
|
if (mIsPressed && mShowProgressIndicator) { |
|
|
|
if (mIsPressed && mShowProgressIndicator) { |
|
|
|
QPen pen; |
|
|
|
QPen pen; |
|
|
|
pen.setBrush(Qt::white); |
|
|
|
pen.setBrush(Qt::white); |
|
|
|
pen.setWidth(3); |
|
|
|
pen.setWidth(3); |
|
|
|
painter->save(); |
|
|
|
painter->save(); |
|
|
|
|
|
|
|
painter->setCompositionMode(QPainter::CompositionMode_SourceOver); |
|
|
|
painter->setPen(pen); |
|
|
|
painter->setPen(pen); |
|
|
|
|
|
|
|
|
|
|
|
int spanAngle = qMin(mPressProgres, UBSettings::longClickInterval) * 360 / UBSettings::longClickInterval; |
|
|
|
int spanAngle = qMin(mPressProgres, UBSettings::longClickInterval) * 360 / UBSettings::longClickInterval; |
|
|
@ -848,6 +851,11 @@ void UBGraphicsToolBarItem::paint(QPainter *painter, const QStyleOptionGraphicsI |
|
|
|
|
|
|
|
|
|
|
|
setBrush(QBrush(UBSettings::paletteColor)); |
|
|
|
setBrush(QBrush(UBSettings::paletteColor)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// QPainter newPainter;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// newPaiter->setBrush(QBrush(Qt::red));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
painter->fillPath(path, brush()); |
|
|
|
painter->fillPath(path, brush()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|