> On Sept. 11, 2013, 7:07 a.m., Martin Klapetek wrote:
> > I think this could be quite simplified with just the code below in teh 
> > contact delegate (it's the same as in the groups header):
> > 
> >     if (option.state & QStyle::State_Open) {
> >         style->drawPrimitive(QStyle::PE_IndicatorArrowDown, 
> > &expandSignOption, painter);
> >     } else {
> >         style->drawPrimitive(QStyle::PE_IndicatorArrowRight, 
> > &expandSignOption, painter);
> >     }
> 
> David Edmundson wrote:
>     I need the         if (element == QStyle::PE_IndicatorBranch) {
>     
>     
>     because there are lots of other primitives being drawn (like scrollbars 
> and such)
>     
>     I need the             if (option->state & QStyle::State_Children) {
>     
>     because otherwise I draw right arrows for all contacts regardless of 
> whether they have subcontacts or not
> 
> Martin Klapetek wrote:
>     > I need the if (element == QStyle::PE_IndicatorBranch) {
>     
>     But you wouldn't in the delegate as that paints only the item, no? 
> option->state is then also available inside the delegate, so we can move it 
> all there and not have any styles involved.

I can't put it in the delegate because of the reason in my massive comment.
drawBranches() doesn't have a QStyleOption* passed.


- David


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/112658/#review39795
-----------------------------------------------------------


On Sept. 10, 2013, 11:56 p.m., David Edmundson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/112658/
> -----------------------------------------------------------
> 
> (Updated Sept. 10, 2013, 11:56 p.m.)
> 
> 
> Review request for Telepathy.
> 
> 
> Description
> -------
> 
> Draw branches for contacts in KPeople mode
> 
> To me it's a lot easier to use and navigate and doesn't look too bad.
> 
> Requires https://git.reviewboard.kde.org/r/112657/
> 
> Fixes 2 of the release blocking bugs.
> 
> (https://bugs.kde.org/show_bug.cgi?id=324602 and 
> https://bugs.kde.org/show_bug.cgi?id=324300)
> These could be solved in other ways, for me this patch is mostly about fixing 
> the problem of double clicking expanding (not reported).
> 
> 
> Diffs
> -----
> 
>   contact-delegate-compact.cpp 945def1565707691072fbcd62b70756ee4e3ee84 
>   contact-list-widget.cpp 7c4c9308940828a923d3c196af51c12314114257 
>   contact-list-widget_p.h 5baae8776702c9f0f8aa78584a04ef402dea1d61 
> 
> Diff: http://git.reviewboard.kde.org/r/112658/diff/
> 
> 
> Testing
> -------
> 
> 
> File Attachments
> ----------------
> 
> 
>   http://git.reviewboard.kde.org/media/uploaded/files/2013/09/10/facebook1.png
> Just arrows, no lines.
>   http://git.reviewboard.kde.org/media/uploaded/files/2013/09/10/arrows1_1.png
> Before
>   http://git.reviewboard.kde.org/media/uploaded/files/2013/09/10/fb1.png
> 
> 
> Thanks,
> 
> David Edmundson
> 
>

_______________________________________________
KDE-Telepathy mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kde-telepathy

Reply via email to