From 8a12c6cc92f27a423f0d9b740e11a7cc8cf8bc92 Mon Sep 17 00:00:00 2001 From: Christian Pulvermacher Date: Sun, 29 Jan 2012 20:06:32 +0100 Subject: [PATCH] Set fullscreen button text if icon is unavailable --- src/fullscreenexitbutton.h | 4 ++++ src/mainwindow.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/fullscreenexitbutton.h b/src/fullscreenexitbutton.h index d2bcd3a..c968eb9 100644 --- a/src/fullscreenexitbutton.h +++ b/src/fullscreenexitbutton.h @@ -64,8 +64,12 @@ FullScreenExitButton::FullScreenExitButton(QWidget *parent) { Q_ASSERT(parent); +#ifdef Q_WS_MAEMO_5 // set the fullsize icon from Maemo's theme setIcon(QIcon("/usr/share/icons/hicolor/48x48/hildon/general_fullsize.png")); +#else + setText(tr("Toggle Fullscreen")); +#endif // ensure that our size is fixed to our ideal size setFixedSize(sizeHint()); diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 34b740f..ce3afc5 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -74,7 +74,11 @@ MainWindow::MainWindow(QString url, int quality, int listen_port, bool view_only zoom_slider->setValue(settings.value("zoomlevel", 95).toInt()); toolbar->addWidget(zoom_slider); +#ifdef Q_WS_MAEMO_5 toolbar->addAction(QIcon("/usr/share/icons/hicolor/48x48/hildon/general_fullsize.png"), "", this, SLOT(toggleFullscreen())); +#else + toolbar->addAction(tr("Toggle Fullscreen"), this, SLOT(toggleFullscreen())); +#endif addToolBar(toolbar); toolbar->setVisible(settings.value("show_toolbar", true).toBool()); toolbar->setEnabled(false); -- 1.7.9.5