From 719300415995ae0c9845e9d372c43b450cb97058 Mon Sep 17 00:00:00 2001 From: "Anselmo Lacerda S. de Melo" Date: Wed, 18 Nov 2009 20:50:21 -0300 Subject: Mobile-demos: window position on desktop Don't set window position to (0, 0) anymore to avoid demos appearing in the top left corner, making it difficult to move (e.g. on Windows). Also adjusts MyBudget's window to the correct height. Signed-off-by: Anselmo Lacerda S. de Melo --- mybudget/src/main.cpp | 1 + shoplist/src/shoppinglistview.cpp | 2 +- weather/mainview.cpp | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/mybudget/src/main.cpp b/mybudget/src/main.cpp index b0522da..de9b7f7 100644 --- a/mybudget/src/main.cpp +++ b/mybudget/src/main.cpp @@ -70,6 +70,7 @@ int main(int argc, char **argv) view->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); view->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); view->setSceneRect(0, 0, windowSize.width(), windowSize.height()); + view->resize(windowSize); view->setViewportUpdateMode(QGraphicsView::BoundingRectViewportUpdate); view->setBackgroundBrush(Qt::black); diff --git a/shoplist/src/shoppinglistview.cpp b/shoplist/src/shoppinglistview.cpp index 1a739f3..da316d1 100644 --- a/shoplist/src/shoppinglistview.cpp +++ b/shoplist/src/shoppinglistview.cpp @@ -74,7 +74,7 @@ void ShoppingListView::adjustScreenSize() #endif */ DesignInformation::setScreenSize(screenSize); - setGeometry(0, 0, screenSize.width(), screenSize.height()); + resize(screenSize.toSize()); if (scene()) scene()->setSceneRect(0.0, 0.0, screenSize.width(), screenSize.height()); centerOn(m_mainContainer); diff --git a/weather/mainview.cpp b/weather/mainview.cpp index 6ee73ae..5f9b5d3 100644 --- a/weather/mainview.cpp +++ b/weather/mainview.cpp @@ -52,8 +52,8 @@ MainView::MainView(bool connected, QWidget *parent) setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform | QPainter::TextAntialiasing); setWindowTitle("Weather"); - setGeometry(QRect(QPoint(0, 0), Settings::windowSize())); m_scene.setSceneRect(QRectF(QPointF(0.0, 0.0), Settings::windowSize())); + resize(Settings::windowSize()); m_scene.setBackgroundBrush(Qt::black); PixmapLoader::connectToOnIdleSignal(this, SLOT(pixmapLoaderIsIdle())); -- cgit v1.2.3