Commit 87892b6e authored by Clément Fauconnier's avatar Clément Fauconnier

recolor function of UBGraphicsTextItem should use scene's isDarkBackground instead of settings

parent e0b1417e
......@@ -246,9 +246,6 @@ void UBGraphicsTextItem::keyReleaseEvent(QKeyEvent *event)
void UBGraphicsTextItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{
QColor color = UBSettings::settings()->isDarkBackground() ? mColorOnDarkBackground : mColorOnLightBackground;
setDefaultTextColor(color);
// Never draw the rubber band, we draw our custom selection with the DelegateFrame
QStyleOptionGraphicsItem styleOption = QStyleOptionGraphicsItem(*option);
styleOption.state &= ~QStyle::State_Selected;
......
......@@ -743,7 +743,7 @@ void UBGraphicsTextItemDelegate::recolor()
//setting new parameters
if (UBSettings::settings()->isDarkBackground())
if (delegated()->scene()->isDarkBackground())
{
if (curBrush.color() == Qt::black)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment