[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: extragear/utils/rsibreak/src
From: Aurélien Gâteau <agateau () kde ! org>
Date: 2011-04-03 22:06:03
Message-ID: 20110403220603.73456AC8D3 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1227000 by gateau:
Hard-code position of popup to bottom-center
M +9 -2 passivepopup.cpp
--- trunk/extragear/utils/rsibreak/src/passivepopup.cpp #1226999:1227000
@@ -19,17 +19,24 @@
#include "passivepopup.h"
+#include <QApplication>
+#include <QDesktopWidget>
#include <QMouseEvent>
#include <KDebug>
+static const int MARGIN = 30;
+
PassivePopup::PassivePopup( QWidget *parent )
: KPassivePopup( parent ) {}
void PassivePopup::show()
{
-#warning FIXME
- KPassivePopup::show( QPoint( 10, 10 ) );
+ // Hardcoded to show at bottom-center for now
+ QRect screenRect = QApplication::desktop()->availableGeometry();
+ int posX = screenRect.left() + (screenRect.width() - sizeHint().width()) / 2;
+ int posY = screenRect.bottom() - sizeHint().height() - MARGIN;
+ KPassivePopup::show( QPoint( posX, posY ) );
}
void PassivePopup::mouseReleaseEvent( QMouseEvent * event )
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic