Hardcoded Colors in KDevelop

Andreas Pakulat apaku at gmx.de
Thu Dec 21 01:33:52 UTC 2006


On 20.12.06 19:16:36, Matt Rogers wrote:
> On Wednesday 20 December 2006 19:02, Andreas Pakulat wrote:
> > Matthew Woelke started out on the quest to remove hard-coded colors
> > within the KDevelop sources. I just did a quick thing on the debugger
> > and went on to find any occurences for QColor in kdevelop. The outcome
> > is really bad. There are quite some parts that use hardcoded colors for
> > their Ui, namely:
> >
> > FileTreeView, integrated designer (quite many herer), ruby debugger and
> > the cpp configuration widget.
> 
> I would prefer if we didn't touch the integrated designer. It's basically a 
> copy of Qt 3's designer and I don't want to be messing around in there if it 
> mostly works.

Hehe, I guess our excuse would be that we try to work the same as the
original designer ;)

> > Now, some of them like the filetreeview use many colors for special
> > highlighting (in that case state of version controlled files) and I'm
> > not sure how to make that work with the "limited" color roles we have in
> > KDE3/Qt3.
> 
> Those colors are customizable in the file tree view. IIRC

Hmm, k. Thats one less to change...

> > One way might be to use the blend() function Matthew implemented for the
> > ProcessWidget, which if I understood correctly blends 1 color into
> > another by a certain factor. That way we could just blend the custom
> > colors into the standard text color (or button, background whatever) to
> > a certain amount.
> >
> > But somebody with more knowledge about styles needs to speak up and
> > "tell" what the proper way would be. I'm willing to do the coding part,
> > I just need to know what I should do.
> >
> > In the meantime I'll see that the configuration widget for C++ is
> > changed, it seems the colors are mainly used for highlighting purposes
> > there, i.e. using red for errors.
> >
> 
> And we should still keep using red there IMHO.

What happens if somebody uses a red background for line-edits? Yes I
know thats not really likely and it would look butt-ugly.

However there's no real "error" color role in Qt3, so I guess I'll stick
with you here and just stay with red... I tried using linkVisited as
Matthew did for the app output, but somehow that doesn't catch the eye
if linkVisited is set to purple ;)

Leaves the ruby debugger for now, but looking at the code all it does is
highlight a color variable in the color the variable contains... So
there's nothing to improve there either.

Andreas

-- 
Don't relax!  It's only your tension that's holding you together.




More information about the KDevelop-devel mailing list