diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/views/dolphincolumnview.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/views/dolphincolumnview.cpp b/src/views/dolphincolumnview.cpp index 1fdc3e0b2..baae66107 100644 --- a/src/views/dolphincolumnview.cpp +++ b/src/views/dolphincolumnview.cpp @@ -268,17 +268,18 @@ void DolphinColumnView::dropEvent(QDropEvent* event) void DolphinColumnView::paintEvent(QPaintEvent* event) { if (!m_childUrl.isEmpty()) { - // indicate the shown URL of the next column by highlighting the shown folder item + // Indicate the shown URL of the next column by highlighting the shown folder item const QModelIndex dirIndex = m_dolphinModel->indexForUrl(m_childUrl); const QModelIndex proxyIndex = m_proxyModel->mapFromSource(dirIndex); if (proxyIndex.isValid() && !selectionModel()->isSelected(proxyIndex)) { - const QRect itemRect = visualRect(proxyIndex); QPainter painter(viewport()); - QColor color = KColorScheme(QPalette::Active, KColorScheme::View).foreground().color(); - color.setAlpha(32); - painter.setPen(Qt::NoPen); - painter.setBrush(color); - painter.drawRect(itemRect); + + QStyleOptionViewItemV4 option; + option.initFrom(this); + option.rect = visualRect(proxyIndex); + option.state = QStyle::State_Enabled | QStyle::State_HasFocus; + option.viewItemPosition = QStyleOptionViewItemV4::OnlyOne; + style()->drawPrimitive(QStyle::PE_FrameFocusRect, &option, &painter, this); } } |
