#include "fullscreenwindow.h"
#include "translucentbutton.h"
+#include "progress.h"
#include "trace.h"
#include "settings.h"
#include "platform.h"
+static const int MARGIN = 9;
+
FullScreenWindow::FullScreenWindow(QWidget *parent): AdopterWindow(parent)
{
TRACE;
setAttribute(Qt::WA_Maemo5StackedWindow, true);
setAttribute(Qt::WA_Maemo5NonComposited, true);
#endif // Q_WS_MAEMO_5
-#ifndef Q_OS_SYMBIAN
- toolBar->hide();
-#endif
QFrame *frame = new QFrame(this);
QVBoxLayout *layout = new QVBoxLayout(frame);
layout->setMargin(0);
setCentralWidget(frame);
restoreButton = new TranslucentButton("view-normal", this);
QRect screen = QApplication::desktop()->screenGeometry();
- restoreButton->setGeometry(screen.width() - TranslucentButton::pixels - 9,
- screen.height() - TranslucentButton::pixels - 9,
- TranslucentButton::pixels, TranslucentButton::pixels);
+ restoreButton->setGeometry(
+ screen.width() - TranslucentButton::pixels - MARGIN,
+ screen.height() - TranslucentButton::pixels - MARGIN,
+ TranslucentButton::pixels,
+ TranslucentButton::pixels);
connect(restoreButton, SIGNAL(triggered()), this, SIGNAL(restore()));
}
-void FullScreenWindow::showFullScreen()
+void FullScreenWindow::showEvent(QShowEvent *e)
{
- TRACE;
- AdopterWindow::showFullScreen();
- restoreButton->flash(3000);
+ Trace t("FullScreenWindow::showEvent");
+ AdopterWindow::showEvent(e);
+ placeChildren();
}
void FullScreenWindow::resizeEvent(QResizeEvent *e)
{
- TRACE;
+ Trace t("FullScreenWindow::resizeEvent");
+ AdopterWindow::resizeEvent(e);
+ placeChildren();
+}
+
+void FullScreenWindow::placeChildren()
+{
+ Trace t("FullScreenWindow::placeChildren");
QRect screen = QApplication::desktop()->screenGeometry();
int w = screen.width();
}
#endif // Q_WS_MAEMO_5
- restoreButton->setGeometry(w - TranslucentButton::pixels - 9,
- h - TranslucentButton::pixels - 9, TranslucentButton::pixels,
+ restoreButton->setGeometry(
+ w - TranslucentButton::pixels - MARGIN,
+ h - TranslucentButton::pixels - MARGIN,
+ TranslucentButton::pixels,
TranslucentButton::pixels);
restoreButton->flash(3000);
- AdopterWindow::resizeEvent(e);
}