branch name appended to project name

Kevin Funk krf at gmx.de
Sun Mar 17 11:51:04 UTC 2013


On Sunday 17 March 2013, 09:09, Andreas Pakulat wrote:
> Hi,
> 
> On Sun, Mar 17, 2013 at 8:00 AM, Jeremy Murphy
> 
> <jeremy.william.murphy at gmail.com> wrote:
> > Hi everyone,
> > 
> > I just noticed that the Projects panel now displays the branch name in
> > parentheses after the project name, which is nice, thank you.  But I don't
> > think it is ideal.  :)  The problem is that it is not distinguishable from
> > a valid project name.  Is it possible to do something to the branch name
> > font to distinguish it?
> 
> Yes this is possible, unfortunately its not quite as easy as in
> Eclipse since the Qt ItemViews do not provide a decoration-metaphor.

I fully agree with Jeremy, there should be some disambiguation.

maybe something like [1] would fit in here?

The VcsOverlayProxyModel introduced by Alex could define a new role for the VCS 
data and in QItemDelegate::paint we do:
- paint role Qt::DisplayRole normally
- paint role VcsOverlayProxyModel::VcsDataRole with QPalette::brightText or 
whatever (only in case data(index, VcsOverlayProxyModel::VcsDataRole) returns valid 
data)

A different but more simple solution: Just add another column in the proxy model, 
and for that column return a different column for Qt::FontRole.
(Of course, that means we have a different text alignment then).

[1] http://qt-project.org/faq/answer/how_can_i_modify_the_color_for_individual_words_for_ite
ms_in_a_view

-- 
Kevin Funk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20130317/6c96eaa6/attachment-0001.html>


More information about the KDevelop-devel mailing list