experimental painting
This commit is contained in:
@@ -135,7 +135,7 @@ void BCValueDelegate::paint(QPainter *painter, const QStyleOptionViewItem& optio
|
|||||||
paintButtonIndicator(painter, option, bcValue);
|
paintButtonIndicator(painter, option, bcValue);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
qDebug() << " ---WTF1: " <<option.rect;
|
|
||||||
BCValueEditor::paintSliderIndicator(painter, option.rect, bcValue.calcMinMaxRatio() );
|
BCValueEditor::paintSliderIndicator(painter, option.rect, bcValue.calcMinMaxRatio() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,6 +62,8 @@ void BCValueEditor::paintSliderIndicator(QPainter* painter, const QRect& rect, d
|
|||||||
painter->save();
|
painter->save();
|
||||||
painter->setRenderHint(QPainter::Antialiasing);
|
painter->setRenderHint(QPainter::Antialiasing);
|
||||||
|
|
||||||
|
qDebug() << " ---WTF in paint: " <<rect;
|
||||||
|
|
||||||
int adjX = rect.width() - cTextBlockOffset;
|
int adjX = rect.width() - cTextBlockOffset;
|
||||||
|
|
||||||
// Mini Progress Bar: der Gesamtbereich
|
// Mini Progress Bar: der Gesamtbereich
|
||||||
@@ -74,6 +76,11 @@ void BCValueEditor::paintSliderIndicator(QPainter* painter, const QRect& rect, d
|
|||||||
barRect.setWidth( ratio * barRect.width() );
|
barRect.setWidth( ratio * barRect.width() );
|
||||||
painter->setBrush(QColor(0x0078D4));
|
painter->setBrush(QColor(0x0078D4));
|
||||||
painter->drawRoundedRect(barRect, 2, 2);
|
painter->drawRoundedRect(barRect, 2, 2);
|
||||||
|
if(rect.x() != 0 )
|
||||||
|
painter->setBrush(Qt::blue);
|
||||||
|
else
|
||||||
|
painter->setBrush(Qt::red);
|
||||||
|
painter->drawRoundedRect(rect, 2, 2);
|
||||||
|
|
||||||
painter->restore();
|
painter->restore();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user