From 7dd5c805e467728070573083fe98ec39860fdf82 Mon Sep 17 00:00:00 2001 From: Rik Hemsley Date: Thu, 30 Mar 2000 01:34:18 +0000 Subject: [PATCH] Now the line of the title pixmap fade out and disappear as they approach and pass under the text. Makes the text much clearer and looks nice too. svn path=/trunk/kdebase/kwin/; revision=45113 --- clients/riscos/riscosclient.cpp | 46 ++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/clients/riscos/riscosclient.cpp b/clients/riscos/riscosclient.cpp index 2497fd7afb..f80f924c56 100644 --- a/clients/riscos/riscosclient.cpp +++ b/clients/riscos/riscosclient.cpp @@ -243,8 +243,52 @@ TitleBar::_updatePixmap() p.drawPixmap(0, 0, *px_title_inactive_left); p.drawTiledPixmap(2, 0, width() - 4, 18, *px_title_inactive); p.drawPixmap(width() - 2, 0, *px_title_inactive_right); - p.setPen(Qt::black); + p.setPen(QColor(0xC3, 0xC3, 0xC3)); p.setFont(options->font()); + + QRect textRect; + + p.drawText( + 3, 0, width() - 6, 18, AlignCenter, client_->caption(), -1, &textRect); + + textRect.setTop(2); + textRect.setBottom(15); + textRect.setLeft(textRect.left() - 4); + textRect.setRight(textRect.right() + 4); + + p.fillRect(textRect, QBrush(QColor(0xC3, 0xC3, 0xC3))); + + int l = textRect.left() - 2; + int r = textRect.right() + 2; + + p.drawLine(l, 2, l, 15); + p.drawLine(r, 2, r, 15); + l -= 1; r += 1; + p.drawLine(l, 2, l, 15); + p.drawLine(r, 2, r, 15); + l -= 1; r += 1; + p.drawLine(l, 2, l, 15); + p.drawLine(r, 2, r, 15); + l -= 2; r += 2; + p.drawLine(l, 2, l, 15); + p.drawLine(r, 2, r, 15); + l -= 1; r += 1; + p.drawLine(l, 2, l, 15); + p.drawLine(r, 2, r, 15); + l -= 1; r += 1; + p.drawLine(l, 2, l, 15); + p.drawLine(r, 2, r, 15); + l -= 2; r += 2; + p.drawLine(l, 2, l, 15); + p.drawLine(r, 2, r, 15); + l -= 2; r += 2; + p.drawLine(l, 2, l, 15); + p.drawLine(r, 2, r, 15); + l -= 2; r += 2; + p.drawLine(l, 2, l, 15); + p.drawLine(r, 2, r, 15); + + p.setPen(Qt::black); p.drawText(3, 0, width() - 6, 18, AlignCenter, client_->caption()); }