# HG changeset patch # User Chris Cannam # Date 1287934683 -7200 # Node ID bb1035a2495800978b955f370f66d81cdc10ee91 # Parent 95cf0d0f93af7c6b24b922d71f117fc5dd29fd85 * Make text clearer on complex backgrounds by adding a translucent surrounding box diff -r 95cf0d0f93af -r bb1035a24958 view/View.cpp --- a/view/View.cpp Wed Oct 13 15:00:28 2010 +0100 +++ b/view/View.cpp Sun Oct 24 17:38:03 2010 +0200 @@ -732,10 +732,20 @@ paint.save(); - QColor penColour, surroundColour; + QColor penColour, surroundColour, boxColour; penColour = getForeground(); surroundColour = getBackground(); + boxColour = surroundColour; + boxColour.setAlpha(127); + + paint.setPen(Qt::NoPen); + paint.setBrush(boxColour); + QRect r = paint.fontMetrics().boundingRect(text); + r.translate(QPoint(x, y)); +// std::cerr << "drawVisibleText: r = " << r.x() << "," <