diff options
author | Kevin Smith <git@kismith.co.uk> | 2009-08-27 18:12:40 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2009-08-27 18:12:40 (GMT) |
commit | 87a1041bbaf6e8031ec3894d71a8296d15bd96ed (patch) | |
tree | a9bf00faff7ec4644188cf3d3dc8f1af552c17f4 /Swift/QtUI/Roster | |
parent | 978cf327a33d496169649bc01181ed1784cc0813 (diff) | |
download | swift-contrib-87a1041bbaf6e8031ec3894d71a8296d15bd96ed.zip swift-contrib-87a1041bbaf6e8031ec3894d71a8296d15bd96ed.tar.bz2 |
Render roster group headings too wide, so they span the whole window.
Diffstat (limited to 'Swift/QtUI/Roster')
-rw-r--r-- | Swift/QtUI/Roster/RosterDelegate.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Swift/QtUI/Roster/RosterDelegate.cpp b/Swift/QtUI/Roster/RosterDelegate.cpp index 2b6ea14..af9f23c 100644 --- a/Swift/QtUI/Roster/RosterDelegate.cpp +++ b/Swift/QtUI/Roster/RosterDelegate.cpp @@ -56,7 +56,9 @@ void RosterDelegate::paint(QPainter* painter, const QStyleOptionViewItem& option void RosterDelegate::paintGroup(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const { painter->save(); painter->setPen(QPen(QColor(189, 189, 189))); - QRect region(QPoint(option.rect.left(), option.rect.top() + verticalMargin_), QSize(option.rect.width(), option.rect.height() - 2 * verticalMargin_)); + //FIXME: It looks like Qt is passing us a rectangle that's too small + //This deliberately draws outside the lines, and we need to find a better solution. + QRect region(QPoint(option.rect.left() - 1, option.rect.top() + verticalMargin_), QSize(option.rect.width() + 1, option.rect.height() - 2 * verticalMargin_)); QLinearGradient fillGradient(region.topLeft(), region.bottomLeft()); fillGradient.setColorAt(0, QColor(244, 244, 244)); fillGradient.setColorAt(0.1, QColor(231, 231, 231)); @@ -130,7 +132,7 @@ const int RosterDelegate::avatarSize_ = 20; const int RosterDelegate::presenceIconHeight_ = 16; const int RosterDelegate::presenceIconWidth_ = 16; const int RosterDelegate::groupCornerRadius_ = 0; -const int RosterDelegate::horizontalMargin_ = 4; +const int RosterDelegate::horizontalMargin_ = 2; const int RosterDelegate::verticalMargin_ = 1; const int RosterDelegate::farLeftMargin_ = 2; |