Remove commented code and dead-code that was used in commented code

(cherry picked from commit ffd9e56cce)
This commit is contained in:
Kurt Hindenburg
2014-04-15 09:16:40 -04:00
parent d02b0c0bf5
commit 91fb70992b

View File

@@ -1342,22 +1342,17 @@ void ColorSchemeViewDelegate::paint(QPainter* painter, const QStyleOptionViewIte
painter->setBrush(gradient);
painter->drawRoundRect(backgroundRect , 4 , 30);
//const bool isChecked = index.data(Qt::CheckStateRole) == Qt::Checked;
const bool isSelected = option.state & QStyle::State_Selected;
// draw border on selected items
if (isSelected) { //|| isChecked )
if (isSelected) {
static const int selectedBorderWidth = 6;
painter->setBrush(QBrush(Qt::NoBrush));
QPen pen;
QColor highlightColor = option.palette.highlight().color();
if (isSelected)
highlightColor.setAlphaF(1.0);
else
highlightColor.setAlphaF(0.7);
highlightColor.setAlphaF(1.0);
pen.setBrush(highlightColor);
pen.setWidth(selectedBorderWidth);