[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdebase/workspace/libs/plasmagenericshell
From:       Aaron J. Seigo <aseigo () kde ! org>
Date:       2010-11-19 2:28:30
Message-ID: 20101119022830.389B1AC8A0 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1198584 by aseigo:

don't bother with the hover background as you can't even really see it anymore and it \
just looks funny and odd.


 M  +3 -3      abstracticon.cpp  
 M  +0 -20     abstracticonlist.cpp  
 M  +0 -3      abstracticonlist.h  


--- trunk/KDE/kdebase/workspace/libs/plasmagenericshell/abstracticon.cpp \
#1198583:1198584 @@ -43,6 +43,7 @@
 
 AbstractIcon::AbstractIcon(QGraphicsItem *parent)
     : QGraphicsWidget(parent),
+      m_background(new Plasma::FrameSvg(this)),
       m_iconHeight(DEFAULT_ICON_SIZE),
       m_maxSize(maximumSize()),
       m_selected(false),
@@ -50,7 +51,6 @@
 {
     setCacheMode(DeviceCoordinateCache);
     setAcceptHoverEvents(true);
-    m_background = new Plasma::FrameSvg(this);
     m_background->setImagePath("widgets/tasks");
     m_background->setElementPrefix("normal");
 }
@@ -225,7 +225,7 @@
     paintForeground(painter, option, widget);
 }
 
-void AbstractIcon::paintBackground(QPainter *painter, const QStyleOptionGraphicsItem \
*option, QWidget *widget) +void AbstractIcon::paintBackground(QPainter *painter, \
const QStyleOptionGraphicsItem *option, QWidget *)  {
     if (m_hovered) {
         m_background->setElementPrefix("hover");
@@ -241,7 +241,7 @@
     m_background->paintFrame(painter, option->rect, option->rect);
 }
 
-void AbstractIcon::paintForeground(QPainter *painter, const QStyleOptionGraphicsItem \
*option, QWidget *widget) +void AbstractIcon::paintForeground(QPainter *painter, \
const QStyleOptionGraphicsItem *, QWidget *)  {
     const QRectF rect = contentsRect();
     const int width = rect.width();
--- trunk/KDE/kdebase/workspace/libs/plasmagenericshell/abstracticonlist.cpp \
#1198583:1198584 @@ -36,7 +36,6 @@
 #include <Plasma/Animator>
 #include <Plasma/Containment>
 #include <Plasma/Corona>
-#include <Plasma/ItemBackground>
 #include <Plasma/Theme>
 #include <Plasma/ToolButton>
 
@@ -83,7 +82,6 @@
     m_appletListLinearLayout->setSpacing(0);
     setWidget(m_appletListWidget);
     adjustFromOrientation();
-    m_hoverIndicator = new Plasma::ItemBackground(m_appletListWidget);
 }
 
 Plasma::Location AbstractIconList::location()
@@ -127,19 +125,6 @@
     updateList();
 }
 
-void AbstractIconList::iconHoverEnter(Plasma::AbstractIcon *icon)
-{
-    if (icon) {
-        m_hoverIndicator->setTargetItem(icon);
-        if (!m_hoverIndicator->isVisible()) {
-            m_hoverIndicator->setGeometry(icon->geometry());
-            m_hoverIndicator->show();
-        }
-    } else {
-        m_hoverIndicator->hide();
-    }
-}
-
 //all items are always in the list. filter updates just hide/show.
 //what do we need the visible-list for? getting position, finding the end of the \
list,  //calculating how many fit on the list...
@@ -179,9 +164,6 @@
 void AbstractIconList::addIcon(AbstractIcon *icon)
 {
     icon->setParent(m_appletListWidget); //FIXME redundant?
-    qreal l, t, r, b;
-    m_hoverIndicator->getContentsMargins(&l, &t, &r, &b);
-    icon->setContentsMargins(l, t, r, b);
 
     //we don't add it to the hash here because we don't know its id.
 
@@ -194,7 +176,6 @@
     m_appletListLinearLayout->setAlignment(icon, Qt::AlignHCenter);
     showIcon(icon);
 
-    connect(icon, SIGNAL(hoverEnter(Plasma::AbstractIcon*)), this, \
                SLOT(iconHoverEnter(Plasma::AbstractIcon*)));
     connect(icon, SIGNAL(clicked(Plasma::AbstractIcon*)), this, \
SLOT(itemSelected(Plasma::AbstractIcon*)));  }
 
@@ -216,7 +197,6 @@
     m_appletListWidget->adjustSize();
 
     updateGeometry();
-    m_hoverIndicator->hide();
     resetScroll();
 }
 
--- trunk/KDE/kdebase/workspace/libs/plasmagenericshell/abstracticonlist.h \
#1198583:1198584 @@ -120,7 +120,6 @@
     void resetScroll();
 
     void itemSelected(Plasma::AbstractIcon *icon);
-    void iconHoverEnter(Plasma::AbstractIcon *icon);
 
     void setSearch();
 
@@ -134,8 +133,6 @@
     Qt::Orientation m_orientation;
     Plasma::Location m_location;
 
-    Plasma::ItemBackground *m_hoverIndicator;
-
     AbstractIcon *m_selectedItem;
 
     QTimer *m_searchDelayTimer;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic