svn path=/trunk/kdeartwork/kwin-styles/plastik/; revision=250061
This commit is contained in:
Dirk Mueller 2003-09-10 17:58:07 +00:00
parent d05d96d5e2
commit 34427cb289
2 changed files with 9 additions and 9 deletions

View file

@ -834,14 +834,14 @@ void PlastikClient::update_captionBuffer()
if (!PlastikHandler::initialized()) return;
const uint maxCaptionLength = 300; // truncate captions longer than this!
QString caption(caption() );
if (caption.length() > maxCaptionLength) {
caption.truncate(maxCaptionLength);
caption.append(" [...]");
QString c(caption() );
if (c.length() > maxCaptionLength) {
c.truncate(maxCaptionLength);
c.append(" [...]");
}
QFontMetrics fm(s_titleFont);
int captionWidth = fm.width(caption);
int captionWidth = fm.width(c);
QPixmap textPixmap;
QPainter painter;
@ -854,7 +854,7 @@ void PlastikClient::update_captionBuffer()
painter.begin(&textPixmap);
painter.setFont(s_titleFont);
painter.setPen(white);
painter.drawText(textPixmap.rect(), AlignCenter, caption );
painter.drawText(textPixmap.rect(), AlignCenter, c );
painter.end();
}
@ -872,7 +872,7 @@ void PlastikClient::update_captionBuffer()
}
painter.setFont(s_titleFont);
painter.setPen(PlastikHandler::getColor(TitleFont,true));
painter.drawText(aCaptionBuffer->rect(), AlignCenter, caption );
painter.drawText(aCaptionBuffer->rect(), AlignCenter, c );
painter.end();
@ -886,7 +886,7 @@ void PlastikClient::update_captionBuffer()
}
painter.setFont(s_titleFont);
painter.setPen(PlastikHandler::getColor(TitleFont,false));
painter.drawText(iCaptionBuffer->rect(), AlignCenter, caption );
painter.drawText(iCaptionBuffer->rect(), AlignCenter, c );
painter.end();
captionBufferDirty = false;

View file

@ -79,7 +79,7 @@ private:
QPixmap *aCaptionBuffer, *iCaptionBuffer;
void update_captionBuffer();
QPixmap *aTitleBarTile, *iTitleBarTile, *aTitleBarTopTile, *iTitleBarTopTile;;
QPixmap *aTitleBarTile, *iTitleBarTile, *aTitleBarTopTile, *iTitleBarTopTile;
bool pixmaps_created;
void create_pixmaps();
void delete_pixmaps();