diff --git a/private/focusindicator.cpp b/private/focusindicator.cpp index 09679a5ae..6a44aad55 100644 --- a/private/focusindicator.cpp +++ b/private/focusindicator.cpp @@ -64,6 +64,11 @@ void FocusIndicator::setCustomGeometry(const QRectF &geometry) syncGeometry(); } +void FocusIndicator::setCustomPrefix(const QString &prefix) +{ + m_customPrefix = prefix; +} + bool FocusIndicator::eventFilter(QObject *watched, QEvent *event) { if (static_cast(watched) != m_parent) { @@ -72,7 +77,7 @@ bool FocusIndicator::eventFilter(QObject *watched, QEvent *event) if (!m_parent->hasFocus() && event->type() == QEvent::GraphicsSceneHoverEnter) { m_background->setElementPrefix("hover"); - m_prefix = "hover"; + m_prefix = m_customPrefix + "hover"; m_fade->setProperty("startOpacity", 0.0); m_fade->setProperty("targetOpacity", 1.0); m_fade->start(); @@ -84,7 +89,7 @@ bool FocusIndicator::eventFilter(QObject *watched, QEvent *event) syncGeometry(); } else if (event->type() == QEvent::FocusIn) { m_background->setElementPrefix("focus"); - m_prefix = "focus"; + m_prefix = m_customPrefix + "focus"; m_fade->setProperty("startOpacity", 0.0); m_fade->setProperty("targetOpacity", 1.0); m_fade->start(); diff --git a/private/focusindicator_p.h b/private/focusindicator_p.h index d415ebe11..9427ce812 100644 --- a/private/focusindicator_p.h +++ b/private/focusindicator_p.h @@ -37,6 +37,7 @@ public: ~FocusIndicator(); void setCustomGeometry(const QRectF &geometry); + void setCustomPrefix(const QString &prefix); void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget); @@ -53,6 +54,7 @@ private: AbstractAnimation *m_fade; QRectF m_customGeometry; QString m_prefix; + QString m_customPrefix; }; } #endif diff --git a/widgets/iconwidget.cpp b/widgets/iconwidget.cpp index 241f3d4f9..0a507f005 100644 --- a/widgets/iconwidget.cpp +++ b/widgets/iconwidget.cpp @@ -1066,6 +1066,7 @@ void IconWidget::paint(QPainter *painter, const QStyleOptionGraphicsItem *option Plasma::PaintUtils::drawHalo(painter, rect); } } + d->drawTextItems(painter, option, labelLayout, infoLayout); } diff --git a/widgets/slider.cpp b/widgets/slider.cpp index a397e95bf..e96d8b26d 100644 --- a/widgets/slider.cpp +++ b/widgets/slider.cpp @@ -157,6 +157,11 @@ void Slider::paint(QPainter *painter, QRect elementRect = d->background->elementRect(handle).toRect(); elementRect.moveCenter(handleRect.center()); + if (orientation() == Qt::Vertical) { + d->focusIndicator->setCustomPrefix("vertical-slider"); + } else { + d->focusIndicator->setCustomPrefix("horizontal-slider"); + } d->focusIndicator->setCustomGeometry(elementRect); d->background->paint(painter, elementRect, handle);