frame button and transparency strokes fixed issue 50

preferencesAboutTextFull
Claudio Valerio 12 years ago
parent bc5a17e43c
commit 82453e5136
  1. 10
      src/domain/UBGraphicsItemDelegate.cpp
  2. 3
      src/domain/UBGraphicsProxyWidget.cpp

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

@ -49,8 +49,11 @@ UBGraphicsProxyWidget::~UBGraphicsProxyWidget()
void UBGraphicsProxyWidget::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{
painter->save();
painter->setCompositionMode(QPainter::CompositionMode_SourceOver);
QGraphicsProxyWidget::paint(painter,option,widget);
Delegate()->postpaint(painter, option, widget);
painter->restore();
}
QVariant UBGraphicsProxyWidget::itemChange(GraphicsItemChange change, const QVariant &value)

Loading…
Cancel
Save