[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/workspace/kwin
From: Hugo Pereira Da Costa <hugo.pereira () free ! fr>
Date: 2010-05-02 20:25:27
Message-ID: 20100502202527.A0487AC8AF () svn ! kde ! org
[Download RAW message or body]
SVN commit 1121963 by hpereiradacosta:
Change KCommonDecoration preview label contents to contain only the decoration name
Removed custom painting of kdecoration previews in kcmdecoration.
M +2 -19 kcmkwin/kwindecoration/preview.cpp
M +1 -1 lib/kcommondecoration.cpp
--- trunk/KDE/kdebase/workspace/kwin/kcmkwin/kwindecoration/preview.cpp \
#1121962:1121963 @@ -126,6 +126,8 @@
QPixmap KDecorationPreview::preview( QTextDocument* document, QWidget* widget )
{
+ Q_UNUSED( document );
+ Q_UNUSED( widget );
QPixmap pixmap( size() );
pixmap.fill( Qt::transparent );
@@ -138,26 +140,7 @@
{
QWidget *w = deco[Active]->widget();
w->render( &pixmap, w->mapToParent( QPoint(0, 0) ) );
- int left, right, top, bottom;
- deco[Active]->borders( left, right, top, bottom );
- int padLeft, padRight, padTop, padBottom;
- padLeft = padRight = padTop = padBottom = 0;
- if( KDecorationUnstable *unstable = qobject_cast<KDecorationUnstable *>( \
deco[Active] ) )
- {
- unstable->padding( padLeft, padRight, padTop, padBottom );
}
- widget->setGeometry( 0, 0,
- w->geometry().width() - left - right - padLeft - \
padRight,
- w->geometry().height() - top - bottom - padTop - \
padBottom );
- QPoint topLeft = w->geometry().topLeft() + QPoint( left + padLeft, top + \
padTop );
- widget->render( &pixmap, topLeft );
- //Enable word-wrap
- const int margin = 5;
- document->setTextWidth( widget->width() - margin * 2 );
- QPainter painter( &pixmap );
- painter.translate( topLeft );
- document->drawContents( &painter, widget->geometry().adjusted( margin, \
margin, -margin, -margin ));
- }
return pixmap;
}
--- trunk/KDE/kdebase/workspace/kwin/lib/kcommondecoration.cpp #1121962:1121963
@@ -288,7 +288,7 @@
// shown instead of the window contents in decoration previews
if(isPreview() ) {
- m_previewWidget = new QLabel(i18n("<center><b>%1 preview</b></center>", \
visibleName() ), widget()); + m_previewWidget = new \
QLabel(i18n("<center><b>%1</b></center>", visibleName() ), widget()); \
m_previewWidget->setAutoFillBackground(true); m_previewWidget->show();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic