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

View File

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