From 07e3f48e789dec32c8e25663610b560abcb12ba6 Mon Sep 17 00:00:00 2001 From: "Daniel M. Duley" Date: Mon, 22 Nov 1999 16:16:32 +0000 Subject: [PATCH] Better active bar text handling. svn path=/trunk/kdebase/kwin/; revision=34710 --- systemclient.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/systemclient.cpp b/systemclient.cpp index 1cfffb9c33..a8d4057117 100644 --- a/systemclient.cpp +++ b/systemclient.cpp @@ -277,8 +277,6 @@ void SystemClient::paintEvent( QPaintEvent* ) p.fillRect(t, options->colorGroup(Options::Frame, false). brush(QColorGroup::Button)); - - QRegion r = rect(); r = r.subtract( t ); p.setClipRegion( r ); @@ -290,9 +288,14 @@ void SystemClient::paintEvent( QPaintEvent* ) p.setPen(options->color(Options::Font, isActive())); p.setFont(options->font(isActive())); - p.setBackgroundMode(OpaqueMode); + if(isActive()){ + QFontMetrics fm(options->font(true)); + p.fillRect(t.x()+((t.width()-fm.width(caption()))/2)-4, t.y(), + fm.width(caption())+8, t.height(), + colorGroup().brush(QColorGroup::Background)); + } + p.drawText( t, AlignCenter, caption() ); - p.setBackgroundMode(TransparentMode); qDrawShadePanel(&p, rect().x()+1, rect().bottom()-6, 24, 6, options->colorGroup(Options::Handle, isActive()), false);