equal
deleted
inserted
replaced
107 Layouts the ui layers according to the given \a rect. |
107 Layouts the ui layers according to the given \a rect. |
108 */ |
108 */ |
109 void HsIdleWidget::setGeometry(const QRectF &rect) |
109 void HsIdleWidget::setGeometry(const QRectF &rect) |
110 { |
110 { |
111 int n = HsScene::instance()->pages().count(); |
111 int n = HsScene::instance()->pages().count(); |
112 mControlLayer->resize(rect.size()); |
112 QRectF layoutRect(HsScene::instance()->mainWindow()->layoutRect()); |
113 mPageLayer->resize(n * rect.width(), rect.height()); |
113 if (layoutRect == rect || (layoutRect.height() == rect.width() && layoutRect.width() == rect.height())) { |
114 mSceneLayer->resize(2 * rect.width() + HsConfiguration::bounceEffect(), rect.height()); |
114 mControlLayer->resize(rect.size()); |
115 HbWidget::setGeometry(rect); |
115 mPageLayer->resize(n * rect.width(), rect.height()); |
|
116 mSceneLayer->resize(2 * rect.width() + HsConfiguration::bounceEffect(), rect.height()); |
|
117 HbWidget::setGeometry(rect); |
|
118 } else { |
|
119 QRectF sceneRect = mapToScene(rect).boundingRect(); |
|
120 sceneRect.setTop(-sceneRect.top()); |
|
121 HbWidget::setGeometry(sceneRect); |
|
122 } |
116 } |
123 } |
117 |
124 |
118 /*! |
125 /*! |
119 Stores the given mouse press \a event. |
126 Stores the given mouse press \a event. |
120 */ |
127 */ |
255 */ |
262 */ |
256 void HsIdleWidget::showPageIndicator() |
263 void HsIdleWidget::showPageIndicator() |
257 { |
264 { |
258 mTrashBin->hide(); |
265 mTrashBin->hide(); |
259 mTrashBin->deactivate(); |
266 mTrashBin->deactivate(); |
|
267 mPageIndicator->setSpacing(HsConfiguration::pageIndicatorSpacing()); // for usability optimization widget, can be removed later on |
260 mPageIndicator->setVisible(1 < mPageIndicator->itemCount()); |
268 mPageIndicator->setVisible(1 < mPageIndicator->itemCount()); |
261 } |
269 } |
262 |
270 |
263 /*! |
271 /*! |
264 Filters the main window's graphics scene (\a object) \a event. |
272 Filters the main window's graphics scene (\a object) \a event. |