X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=fullscreenwindow.cpp;h=07bf2910bca80d707f6fbefd19a2a44f6bcdd502;hb=5648f4dcb3f32f229b54f94fb4b243ffb2080959;hp=ca8baba7f82256ef952b7e821dcfe8a07dd37d11;hpb=549e8d8b51f631005863aa7f4f3cb2683a901669;p=dorian diff --git a/fullscreenwindow.cpp b/fullscreenwindow.cpp index ca8baba..07bf291 100644 --- a/fullscreenwindow.cpp +++ b/fullscreenwindow.cpp @@ -38,14 +38,35 @@ FullScreenWindow::FullScreenWindow(QWidget *parent): void FullScreenWindow::showFullScreen() { - TRACE; + Trace t("FullScreenWindow::showFullScreen"); AdopterWindow::showFullScreen(); - restoreButton->flash(3000); + placeChildren(); } void FullScreenWindow::resizeEvent(QResizeEvent *e) { + Trace t("FullScreenWindow::resizeEvent"); + QTimer::singleShot(100, this, SLOT(placeChildren())); + AdopterWindow::resizeEvent(e); +} + +void FullScreenWindow::takeChildren(BookView *view, + Progress *prog, + TranslucentButton *previous, + TranslucentButton *next) +{ TRACE; + progress = prog; + previousButton = previous; + nextButton = next; + QList otherChildren; + otherChildren << progress << previousButton << nextButton; + AdopterWindow::takeChildren(view, otherChildren); +} + +void FullScreenWindow::placeChildren() +{ + Trace t("FullScreenWindow::placeChildren"); QRect screen = QApplication::desktop()->screenGeometry(); int w = screen.width(); @@ -72,6 +93,9 @@ void FullScreenWindow::resizeEvent(QResizeEvent *e) if (hasChild(progress)) { progress->setGeometry(0, h - progress->thickness(), w, progress->thickness()); + qDebug() << "Screen (FullScreenWindow::resizeEvent)" << w << "x" << h; + qDebug() << "Progress (FullScreenWindow::resizeEvent)" + << progress->geometry(); } if (hasChild(previousButton)) { previousButton->setGeometry( @@ -89,19 +113,4 @@ void FullScreenWindow::resizeEvent(QResizeEvent *e) } restoreButton->flash(3000); - AdopterWindow::resizeEvent(e); -} - -void FullScreenWindow::takeChildren(BookView *view, - Progress *prog, - TranslucentButton *previous, - TranslucentButton *next) -{ - TRACE; - progress = prog; - previousButton = previous; - nextButton = next; - QList otherChildren; - otherChildren << progress << previousButton << nextButton; - AdopterWindow::takeChildren(view, otherChildren); }