]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Don't draw an alpha blended circle around the toggle selection. It looks less clutter...
authorPeter Penz <peter.penz19@gmail.com>
Thu, 7 May 2009 17:41:43 +0000 (17:41 +0000)
committerPeter Penz <peter.penz19@gmail.com>
Thu, 7 May 2009 17:41:43 +0000 (17:41 +0000)
svn path=/trunk/KDE/kdebase/apps/; revision=964947

src/selectionmanager.cpp
src/selectiontoggle.cpp

index 7dd07e63efa42337db2fb2759a0fee978bfdfbd0..dea4c144998ed21b7b41cbd88ff062cd1ce3d502 100644 (file)
@@ -80,12 +80,7 @@ void SelectionManager::slotEntered(const QModelIndex& index)
         }
 
         const QRect rect = m_view->visualRect(index);
         }
 
         const QRect rect = m_view->visualRect(index);
-
-        // align the toggle on the bottom left of the item
-        const int gap = 2;
-        const int x = rect.left() + gap;
-        const int y = rect.top() + gap;
-        m_toggle->move(QPoint(x, y));
+        m_toggle->move(QPoint(rect.left(), rect.top()));
 
         // increase the size of the toggle for large items
         const int height = m_view->iconSize().height();
 
         // increase the size of the toggle for large items
         const int height = m_view->iconSize().height();
index 8a77da0d3398455f2d0710ab7651a30479a92588..6608b582126f072e2e2c0b6d26794f1dfe64ef08 100644 (file)
@@ -159,22 +159,6 @@ void SelectionToggle::paintEvent(QPaintEvent* event)
 {
     QPainter painter(this);
     painter.setClipRect(event->rect());
 {
     QPainter painter(this);
     painter.setClipRect(event->rect());
-    painter.setRenderHint(QPainter::Antialiasing);
-
-    // draw an alpha blended circle as background
-    const QPalette& palette = parentWidget()->palette();
-
-    const QBrush& backgroundBrush = palette.brush(QPalette::Normal, QPalette::Window);
-    QColor background = backgroundBrush.color();
-    background.setAlpha(m_fadingValue / 2);
-    painter.setBrush(background);
-
-    const QBrush& foregroundBrush = palette.brush(QPalette::Normal, QPalette::WindowText);
-    QColor foreground = foregroundBrush.color();
-    foreground.setAlpha(m_fadingValue / 4);
-    painter.setPen(foreground);
-
-    painter.drawEllipse(0, 0, width(), height());
 
     // draw the icon overlay
     if (m_isHovered) {
 
     // draw the icon overlay
     if (m_isHovered) {