formatting; stack view colors (Was: branches/kdevelop/3.4/languages/cpp/debugger)

Vladimir Prus ghost at cs.msu.su
Thu Dec 21 16:41:25 UTC 2006


On Thursday 21 December 2006 14:29, Andreas Pakulat wrote:
> On 21.12.06 08:58:07, Vladimir Prus wrote:
> > On Thursday 21 December 2006 03:49, Andreas Pakulat wrote:
> > > SVN commit 615311 by apaku:
> > > 
> > > Don't use hardcoded colors, this messes up KDE styling.
> > > 
> > > Volodya: If you think you really need 2 colors in the listview, lets discuss
> > > this on the list and see what color role may fit the purpose.
> > 
> > > --- branches/kdevelop/3.4/languages/cpp/debugger/framestackwidget.cpp #615310:615311
> > > @@ -38,7 +38,7 @@
> > >  {
> > >  
> > >  FramestackWidget::FramestackWidget(GDBController* controller,
> > > -                                   QWidget *parent, 
> > > +                                   QWidget *parent,
> > >                                     const char *name, WFlags f)
> > >          : QListView(parent, name, f),
> > >            viewedThread_(0),
> > > @@ -129,7 +129,7 @@
> > >  {
> > >      switch(e)
> > >      {
> > > -        case GDBController::program_state_changed: 
> > > +        case GDBController::program_state_changed:
> > 
> > 
> > I don't think this change corresponds to the change log? Would it be possible to
> > not change formatting, because next time I save this file the formatting
> > will be automatically fixed back and we'll have yet another huge commit.
> 
> I wonder where that came from. I did not reformat any of that code and I
> don't think kate does this on its own. At least not on lines I don't
> touch. 
> 
> Also I found that kate-modelines don't really work, so I guess I have to
> use vim for any tab-indented files in the future :(
> 
> > > -void FrameStackItem::paintCell(QPainter * p, const QColorGroup & cg, 
> > > -                               int column, int width, int align )
> > > -{
> > > -    QColorGroup cg2(cg);
> > > -    if (column % 2)
> > > -    {
> > > -        cg2.setColor(QColorGroup::Base, QColor("#e4f4fe"));
> > > -    }
> > > -    QListViewItem::paintCell(p, cg2, column, width, align);
> > >  }
> > 
> > I *do* want different colors. What's the right way to grab "alternative listview color"
> > >from QPalette or KDE style? 
> 
> You should fetch it from the palette. So I think you should revert my
> change (which also fixes the formatting ;) and then change the code to
> use one of the color roles from the QPalette.

Except that I don't think that Qt3's QPalette has such a color role. Any ideas?

- Volodya




More information about the KDevelop-devel mailing list