From 666a2224f41c2c46b6fe16b67e033a0d483bcc72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Wed, 18 Mar 2009 10:45:46 +0000 Subject: [PATCH] Center desktop name box on active screen instead of the center of whole area. So the desktop name is always visible in multi screen setups and only shown on one screen. svn path=/trunk/KDE/kdebase/workspace/; revision=940812 --- effects/cube/cube.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/effects/cube/cube.cpp b/effects/cube/cube.cpp index 5e280ae949..7016742708 100644 --- a/effects/cube/cube.cpp +++ b/effects/cube/cube.cpp @@ -652,8 +652,9 @@ void CubeEffect::paintScreen( int mask, QRegion region, ScreenPaintData& data ) opacity = timeLine.value(); if( stop ) opacity = 1.0 - timeLine.value(); - QRect frameRect = QRect( rect.width() * 0.33f + rect.x(), rect.height() * 0.95f + rect.y(), - rect.width() * 0.34f, QFontMetrics( desktopNameFont ).height() ); + QRect screenRect = effects->clientArea( ScreenArea, activeScreen, frontDesktop ); + QRect frameRect = QRect( screenRect.width() * 0.33f + screenRect.x(), screenRect.height() * 0.95f + screenRect.y(), + screenRect.width() * 0.34f, QFontMetrics( desktopNameFont ).height() ); desktopNameFrame.setGeometry( frameRect ); desktopNameFrame.setText( effects->desktopName( frontDesktop ) ); desktopNameFrame.render( region, opacity );