}
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();
{
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) {