summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnselmo Lacerda S. de Melo <anselmo.melo@openbossa.org>2009-11-18 20:50:21 -0300
committerAnselmo Lacerda S. de Melo <anselmo.melo@openbossa.org>2009-11-19 00:28:56 -0300
commit719300415995ae0c9845e9d372c43b450cb97058 (patch)
tree495161cba507893562e41de29c5db47271144f2f
parent47ab8ebe71954820f869b51ecc764ef5953de063 (diff)
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 <anselmo.melo@openbossa.org>
-rw-r--r--mybudget/src/main.cpp1
-rw-r--r--shoplist/src/shoppinglistview.cpp2
-rw-r--r--weather/mainview.cpp2
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()));