From: Sami Rämö Date: Thu, 19 Aug 2010 09:06:34 +0000 (+0300) Subject: Fixed the stacking order of the UI components X-Git-Tag: v2.0b-1~50^2^2 X-Git-Url: https://vcs.maemo.org/git/?p=situare;a=commitdiff_plain;h=30454cf0cc07accfcdb079a93c4e1f3bee6936f2 Fixed the stacking order of the UI components - Reviewed by Jussi Laitinen - Removed layout from the MainWindow and set the MapView to be the central widget. - Some small modifications to the stacking order --- diff --git a/src/ui/mainwindow.cpp b/src/ui/mainwindow.cpp index 34e99a0..c01091c 100644 --- a/src/ui/mainwindow.cpp +++ b/src/ui/mainwindow.cpp @@ -79,14 +79,9 @@ MainWindow::MainWindow(QWidget *parent) buildMap(); - // build main layout - QHBoxLayout *layout = new QHBoxLayout; - layout->addWidget(m_mapView); - layout->setMargin(0); - layout->setSpacing(0); - - setCentralWidget(new QWidget()); - centralWidget()->setLayout(layout); + // map view is the only widget which size & location is handled automatically by the system + // default functionality + setCentralWidget(m_mapView); buildPanels(); @@ -94,14 +89,14 @@ MainWindow::MainWindow(QWidget *parent) setWindowTitle(tr("Situare")); // set stacking order of widgets (from top to bottom) - // if fullscreen button exists, then it is the topmost one, otherwise own location crosshair is + // if the fullscreen button exists, then it is the topmost one, otherwise the tabbed panel is if (m_fullScreenButton) { - m_ownLocationCrosshair->stackUnder(m_fullScreenButton); + m_tabbedPanel->stackUnder(m_fullScreenButton); } + m_ownLocationCrosshair->stackUnder(m_tabbedPanel); m_zoomButtonPanel->stackUnder(m_ownLocationCrosshair); m_indicatorButtonPanel->stackUnder(m_zoomButtonPanel); - m_tabbedPanel->stackUnder(m_indicatorButtonPanel); - m_osmLicense->stackUnder(m_tabbedPanel); + m_osmLicense->stackUnder(m_indicatorButtonPanel); m_mapScale->stackUnder(m_osmLicense); m_mapView->stackUnder(m_mapScale);