Commit 04484fd1 authored by Tomaz  Canabrava's avatar Tomaz Canabrava
Browse files

Be more pedantic on the color values

parent 309be51f
......@@ -164,10 +164,16 @@ void DetachableTabBar::paintEvent(QPaintEvent *event)
painter.setPen(Qt::NoPen);
for (int tabIndex = 0; tabIndex < count(); tabIndex++) {
QColor varColor = tabData(tabIndex).value<QColor>();
const QVariant data = tabData(tabIndex);
if (!data.isValid()) {
continue;
}
QColor varColor = data.value<QColor>();
if (!varColor.isValid()) {
continue;
}
varColor.setAlpha(tabIndex == currentIndex() ? 180 : 125);
painter.setBrush(varColor);
painter.drawRect(tabRect(tabIndex));
......
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