Changeset View
Changeset View
Standalone View
Standalone View
sidebar/SidebarDelegate.cpp
Show All 30 Lines | |||||
31 | 31 | | |||
32 | SidebarDelegate::~SidebarDelegate() | 32 | SidebarDelegate::~SidebarDelegate() | ||
33 | { | 33 | { | ||
34 | } | 34 | } | ||
35 | 35 | | |||
36 | 36 | | |||
37 | QSize SidebarDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const | 37 | QSize SidebarDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const | ||
38 | { | 38 | { | ||
39 | Q_UNUSED(index) | ||||
39 | return QSize(option.decorationSize.width() + s_margin * 2, option.decorationSize.height() + s_margin * 2); | 40 | return QSize(option.decorationSize.width() + s_margin * 2, option.decorationSize.height() + s_margin * 2); | ||
40 | } | 41 | } | ||
41 | 42 | | |||
42 | void SidebarDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const | 43 | void SidebarDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const | ||
43 | { | 44 | { | ||
44 | Q_ASSERT(index.isValid()); | 45 | Q_ASSERT(index.isValid()); | ||
45 | 46 | | |||
46 | painter->save(); | 47 | painter->save(); | ||
▲ Show 20 Lines • Show All 135 Lines • Show Last 20 Lines |