if the theme wants to use the system style, disable completely any focusindicator
svn path=/trunk/KDE/kdelibs/; revision=1216322
This commit is contained in:
parent
ade5dd1ae7
commit
0ac2c5b81f
@ -121,7 +121,8 @@ void FocusIndicator::setCustomPrefix(const QString &prefix)
|
|||||||
|
|
||||||
bool FocusIndicator::eventFilter(QObject *watched, QEvent *event)
|
bool FocusIndicator::eventFilter(QObject *watched, QEvent *event)
|
||||||
{
|
{
|
||||||
if (static_cast<QGraphicsWidget *>(watched) != m_parent || !m_parent) {
|
if (Theme::defaultTheme()->useNativeWidgetStyle() ||
|
||||||
|
static_cast<QGraphicsWidget *>(watched) != m_parent || !m_parent ) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -274,6 +275,13 @@ void FocusIndicator::paint(QPainter *painter, const QStyleOptionGraphicsItem *op
|
|||||||
|
|
||||||
void FocusIndicator::syncGeometry()
|
void FocusIndicator::syncGeometry()
|
||||||
{
|
{
|
||||||
|
if (Theme::defaultTheme()->useNativeWidgetStyle()) {
|
||||||
|
hide();
|
||||||
|
return;
|
||||||
|
} else if (!isVisible()) {
|
||||||
|
show();
|
||||||
|
}
|
||||||
|
|
||||||
QRectF geom;
|
QRectF geom;
|
||||||
if (!m_customGeometry.isEmpty()) {
|
if (!m_customGeometry.isEmpty()) {
|
||||||
geom = m_customGeometry;
|
geom = m_customGeometry;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user