diff --git a/delegate.cpp b/delegate.cpp index fa399d77c..10f3b68f6 100644 --- a/delegate.cpp +++ b/delegate.cpp @@ -300,8 +300,8 @@ void Delegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QColor gradientColor = KColorScheme(QPalette::Active).background(KColorScheme::NormalBackground).color(); if (option.direction == Qt::LeftToRight) { - if ((titleRect.width() + 20) > option.rect.width() || - (subTitleRect.width() + 20) > option.rect.width()) { + if ((titleRect.width() + 60) > option.rect.width() || + (subTitleRect.width() + 60) > option.rect.width()) { QLinearGradient gr; QRect gradientRect(option.rect.width() - 30, titleRect.y(), 80, titleRect.height() + subTitleRect.height()); @@ -315,8 +315,8 @@ void Delegate::paint(QPainter *painter, const QStyleOptionViewItem &option, } } else { - if (titleRect.width() + 20 > option.rect.width() || - subTitleRect.width() + 20 > option.rect.width()) { + if (titleRect.width() + 60 > option.rect.width() || + subTitleRect.width() + 60 > option.rect.width()) { QLinearGradient gr; QRect gradientRect(option.rect.x() - 25, titleRect.y(), 60, titleRect.height() + subTitleRect.height()); diff --git a/delegate.h b/delegate.h index 39743d626..ec2da141a 100644 --- a/delegate.h +++ b/delegate.h @@ -79,6 +79,7 @@ public: virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const; + protected: /** * Returns the empty area after the title. diff --git a/private/toolbox.cpp b/private/toolbox.cpp index cff4ba2a9..27aa1b7e3 100644 --- a/private/toolbox.cpp +++ b/private/toolbox.cpp @@ -72,6 +72,7 @@ ToolBox::ToolBox(Containment *parent) : QGraphicsItem(parent), d(new ToolBoxPrivate(parent)) { + d->userMoved = false; setAcceptsHoverEvents(true); }