Set fullscreen button text if icon is unavailable
authorChristian Pulvermacher <pulvermacher@gmx.de>
Sun, 29 Jan 2012 19:06:32 +0000 (20:06 +0100)
committerChristian Pulvermacher <pulvermacher@gmx.de>
Sun, 29 Jan 2012 19:06:32 +0000 (20:06 +0100)
src/fullscreenexitbutton.h
src/mainwindow.cpp

index d2bcd3a..c968eb9 100644 (file)
@@ -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());
index 34b740f..ce3afc5 100644 (file)
@@ -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);