[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdegraphics/kuickshow/src
From: Carsten Pfeiffer <carpdjih () mailbox ! tu-berlin ! de>
Date: 2004-01-10 23:57:24
Message-ID: 20040110235724.5EA2482ED () office ! kde ! org
[Download RAW message or body]
CVS commit by pfeiffer:
change for multi-head setups (centering in fullscreen mode)
Can anyone with a multi-head setup please test if this makes sense
(in both xinerama and non-xinerama mode)? Thanks!
CCMAIL: 68137@bugs.kde.org
M +24 -6 imagewindow.cpp 1.58
--- kdegraphics/kuickshow/src/imagewindow.cpp #1.57:1.58
@@ -285,13 +285,31 @@ void ImageWindow::updateGeometry( int im
void ImageWindow::centerImage()
{
- // Modified by Evan for his Multi-Head (2 screens)
- // This should center on the first head
- if ( myIsFullscreen && m_numHeads > 1 && ((m_numHeads % 2) == 0) )
- xpos = ((width()/m_numHeads) / 2) - imageWidth()/2;
+ int w, h;
+ if ( myIsFullscreen )
+ {
+ QRect desktopRect = KGlobalSettings::desktopGeometry( this );
+ w = desktopRect.width();
+ h = desktopRect.height();
+ }
else
- xpos = width()/2 - imageWidth()/2;
+ {
+ w = width();
+ h = height();
+ }
+
+ xpos = w/2 - imageWidth()/2;
+ ypos = h/2 - imageHeight()/2;
- ypos = height()/2 - imageHeight()/2;
XMoveWindow( x11Display(), win, xpos, ypos );
+
+ // Modified by Evan for his Multi-Head (2 screens)
+ // This should center on the first head
+// if ( myIsFullscreen && m_numHeads > 1 && ((m_numHeads % 2) == 0) )
+// xpos = ((width()/m_numHeads) / 2) - imageWidth()/2;
+// else
+// xpos = width()/2 - imageWidth()/2;
+
+// ypos = height()/2 - imageHeight()/2;
+// XMoveWindow( x11Display(), win, xpos, ypos );
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic