From 482bb4e19882aab891836a780f2584387e9abc10 Mon Sep 17 00:00:00 2001 From: Akos Polster Date: Sun, 9 Jan 2011 22:00:08 +0100 Subject: [PATCH 1/1] Show button for full screen mode on Symbian, too. --- mainwindow.cpp | 27 +++++++++++++-------------- pkg/changelog | 1 + widgets/mainbase.cpp | 3 --- 3 files changed, 14 insertions(+), 17 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index e20bf84..ae78ed9 100755 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -60,11 +60,6 @@ MainWindow::MainWindow(QWidget *parent): // Tool bar actions -#ifdef Q_OS_SYMBIAN - fullScreenAction = addToolBarAction(this, SLOT(showBig()), - "view-fullscreen", tr("Full screen")); -#endif - chaptersAction = addToolBarAction(this, SLOT(showChapters()), "chapters", tr("Chapters"), true); bookmarksAction = addToolBarAction(this, SLOT(showBookmarks()), @@ -72,30 +67,34 @@ MainWindow::MainWindow(QWidget *parent): infoAction = addToolBarAction(this, SLOT(showInfo()), "info", tr("Book info"), true); libraryAction = addToolBarAction(this, SLOT(showLibrary()), - "library", tr("Library"), true); + "library", tr("Library"), false); #ifdef Q_WS_MAEMO_5 settingsAction = menuBar()->addAction(tr("Settings")); connect(settingsAction, SIGNAL(triggered()), this, SLOT(showSettings())); devToolsAction = menuBar()->addAction(tr("Developer")); connect(devToolsAction, SIGNAL(triggered()), this, SLOT(showDevTools())); - QAction *aboutAction = menuBar()->addAction(tr("About")); - connect(aboutAction, SIGNAL(triggered()), this, SLOT(about())); #else settingsAction = addToolBarAction(this, SLOT(showSettings()), "preferences-system", tr("Settings")); devToolsAction = addToolBarAction(this, SLOT(showDevTools()), "developer", tr("Developer")); - addToolBarAction(this, SLOT(about()), "about", tr("About")); -#endif // Q_WS_MAEMO_5 +#endif -#ifndef Q_OS_SYMBIAN addToolBarSpace(); fullScreenAction = addToolBarAction(this, SLOT(showBig()), - "view-fullscreen", tr("Full screen")); + "view-fullscreen", tr("Full screen"), true); + +#if defined(Q_WS_MAEMO_5) + QAction *aboutAction = menuBar()->addAction(tr("About")); + connect(aboutAction, SIGNAL(triggered()), this, SLOT(about())); #else - (void)addToolBarAction(this, SLOT(close()), "", tr("Exit")); -#endif + addToolBarAction(this, SLOT(about()), "about", tr("About")); +#endif // defined(Q_WS_MAEMO_5) + +#if defined(Q_OS_SYMBIAN) + (void)addToolBarAction(this, SLOT(close()), "", tr("Exit"), false); +#endif // defined(Q_OS_SYMBIAN) // Decorations prev = new TranslucentButton("back", this); diff --git a/pkg/changelog b/pkg/changelog index 0e3bf68..ab2bd7c 100644 --- a/pkg/changelog +++ b/pkg/changelog @@ -8,6 +8,7 @@ dorian (0.4.4-1) unstable; urgency=low * Show presence of extra book parts * Allow editing bookmark notes * Make orientation switch explicit on Symbian, too + * Show button for full screen mode on Symbian, too -- Akos Polster Sun, 5 Dec 2010 02:00:00 +0100 diff --git a/widgets/mainbase.cpp b/widgets/mainbase.cpp index 4a9b4fb..88c623c 100755 --- a/widgets/mainbase.cpp +++ b/widgets/mainbase.cpp @@ -51,7 +51,6 @@ QAction *MainBase::addToolBarAction(QObject *receiver, if (!toolBar) { // Create tool bar if needed toolBar = new QToolBar("", this); - toolBar->setStyleSheet("margin:0; border:0; padding:0"); addToolBar(Qt::BottomToolBarArea, toolBar); } // Add tool bar action @@ -79,11 +78,9 @@ QAction *MainBase::addToolBarAction(QObject *receiver, void MainBase::addToolBarSpace() { -#ifndef Q_OS_SYMBIAN QFrame *frame = new QFrame(toolBar); frame->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); toolBar->addWidget(frame); -#endif } void MainBase::updateToolBar() -- 1.7.9.5