head 1.1; access; symbols; locks; strict; comment @# @; 1.1 date 2003.06.19.19.21.32; author swiergot; state Exp; branches; next ; desc @@ 1.1 log @- Added prtgrp patch (group headers looks much nicer). - Added fixcolor patch so prtgrp can work with colors patch. - Added status_indicator patch that makes it possible to display little (i) icons next to contact that have status message set. - Added indicator.png icon for status_indicator patch. - prtgrp and status_indicator patches has been made by Tomasz Sterna. @ text @diff -rubBwE psi-0.9-test2-groups/src/contactview.cpp psi-0.9-test2-smk/src/contactview.cpp --- psi-0.9-test2-groups/src/contactview.cpp 2003-06-11 22:12:53.000000000 +0200 +++ psi-0.9-test2-smk/src/contactview.cpp 2003-06-11 23:49:30.000000000 +0200 @@@@ -2192,16 +2192,18 @@@@ else if(d->type == Group || d->type == Profile) { QColorGroup xcg = cg; xcg.setColor(QColorGroup::Text, option.color[cGroupFore]); - xcg.setColor(QColorGroup::Base, option.color[cGroupBack]); +// xcg.setColor(QColorGroup::Base, option.color[cGroupBack]); - //QFont f = p->font(); - //f.setPixelSize(8); - //p->setFont(f); + if(d->type == Group) { + QFont f = p->font(); + f.setPointSize(f.pointSize() - 2); + p->setFont(f); + } QListViewItem::paintCell(p, xcg, column, width, alignment); - p->setPen(QPen(option.color[cGroupFore])); - p->drawRect(0, 0, width, height()); +// p->setPen(QPen(option.color[cGroupFore])); +// p->drawRect(0, 0, width, height()); QFontMetrics fm(p->font()); int x = fm.width(text(column)) + pixmap(column)->width() + 8; @@@@ -2220,6 +2222,17 @@@@ int y = ((height() - fm.height()) / 2) + fm.ascent(); p->drawText(x, y, d->groupInfo); + + x += fm.width(d->groupInfo) + 8; + if(x < width - 8) { + int h = (height() / 2) - 1; + p->setPen(QPen(option.color[cGroupBack])); + p->drawLine(x, h, width - 8, h); + h++; + p->setPen(QPen(option.color[cGroupFore])); + p->drawLine(x, h, width - 8, h); + } + } } @ .