KDE/kdevplatform

Robin Pedersen robinpeder at gmail.com
Tue Jun 16 07:47:46 UTC 2009


On Sun, May 24, 2009 at 2:19 AM, David
Nolden<david.nolden.kde at art-master.de> wrote:
> SVN commit 972011 by zwabel:
>
> - Highlight the currently active area, so a change catches the users eye
>
> +void AreaTabWidget::paintEvent ( QPaintEvent* ev ) {
> +    QWidget::paintEvent ( ev );
> +
> +    if ( tabBar->isVisible() && tabBar->count() > 0 ) {
> +        QStylePainter p ( this );
> +
> +        if ( tabBar->currentIndex() != -1 ) {
> +            //Draw highlight behind current area
> +            QRect activeRect = tabBar->tabRect ( tabBar->currentIndex() );
> +            QRect tabArea = QRect ( activeRect.topLeft() + tabBar->pos(), activeRect.bottomRight() + tabBar->pos() ) & ev->rect();
> +            QImage img ( tabArea.width(), tabArea.height(), QImage::Format_ARGB32 );
> +            img.fill ( 0 );
> +            QPainter paintImg ( &img );
> +            QColor color ( palette().color ( QPalette::Active, QPalette::Highlight ) );
> +            color.setAlpha ( 80 );
> +            QRect paint = tabArea;
> +            const int margin = 10;
> +            paint.setLeft ( margin );
> +            paint.setTop ( margin );
> +            paint.setRight ( activeRect.width()-margin );
> +            paint.setBottom ( activeRect.height()-margin );
> +
> +            paintImg.fillRect ( paint, color );
> +            expblur<16,7> ( img, margin/2 );
> +            p.drawImage ( tabArea, img );
> +        }
> +

IMHO, this was a very bad idea. I just tried the recent trunk version
yesterday, and I don't like the appearance of these tabs. But more
importantly, I think it's very bad that application developers are
deliberately implementing inconsistency.

Why do tabs in kdev4 need to be highlighted differently than tabs in
the rest of kde?
If you have a problem with the appearance of tabs, why don't you work
on oxygen instead of implementing this hack?

Just an opinion, from a user's point of view.

-- 
Robin Pedersen




More information about the KDevelop-devel mailing list