size the sheet accordingly to the screen geometry

This commit is contained in:
Marco Martin 2012-02-28 15:15:38 +01:00
parent ab44729083
commit db4d97ff86
2 changed files with 7 additions and 0 deletions

View File

@ -19,6 +19,10 @@
#include "fullscreensheet.h"
#include <QApplication>
#include <QDesktopWidget>
#include <QGraphicsView>
#include <KDebug>
FullScreenSheet::FullScreenSheet(QDeclarativeItem *parent)
@ -26,6 +30,8 @@ FullScreenSheet::FullScreenSheet(QDeclarativeItem *parent)
{
init("Sheet");
view()->setGeometry(QApplication::desktop()->availableGeometry().adjusted(50, 50, 0, 50));
if (mainItem()) {
connect(mainItem(), SIGNAL(acceptButtonChanged()),
this, SIGNAL(acceptButtonChanged()));

View File

@ -296,6 +296,7 @@ QGraphicsView *FullScreenWindow::view() const
return m_view;
}
QDeclarativeListProperty<QGraphicsObject> FullScreenWindow::title()
{
if (m_rootObject) {