regionsView(0),
mediaObject(0),
audioOutput(0),
- m_fullscreen(false) {
+ m_fullscreen(false),
+ m_compact(false) {
singleton = this;
}
}
+bool MainWindow::isReallyFullScreen() {
+#ifdef Q_WS_MAC
+ WId handle = winId();
+ if (mac::CanGoFullScreen(handle)) return mac::IsFullScreen(handle);
+ else return isFullScreen();
+#else
+ return isFullScreen();
+#endif
+}
+
void MainWindow::compactView(bool enable) {
+ m_compact = enable;
static QList<QKeySequence> compactShortcuts;
static QList<QKeySequence> stopShortcuts;
#endif
if (enable) {
- setMinimumSize(160, 120);
+ setMinimumSize(320, 180);
#ifdef Q_WS_MAC
mac::RemoveFullScreenWindow(winId());
#endif
if (settings.contains(key))
restoreGeometry(settings.value(key).toByteArray());
else
- resize(320, 240);
+ resize(320, 180);
mainToolBar->setVisible(!enable);
mediaView->setPlaylistVisible(!enable);
// auto float on top
floatOnTop(enable);
+
+#ifdef Q_WS_MAC
+ mac::compactMode(winId(), enable);
+#endif
}
void MainWindow::searchFocus() {
void buy();
void hideBuyAction();
#endif
+ bool isReallyFullScreen();
+ bool isCompact() { return m_compact; }
protected:
void changeEvent(QEvent *);
bool m_fullscreen;
bool m_maximized;
QTimer *mouseTimer;
+ bool m_compact;
+
};
#endif