diff --git a/ui/drivers/qt/ui_qt_window.cpp b/ui/drivers/qt/ui_qt_window.cpp index 0f3cd0766b..95bcdc1f8d 100644 --- a/ui/drivers/qt/ui_qt_window.cpp +++ b/ui/drivers/qt/ui_qt_window.cpp @@ -1416,13 +1416,18 @@ void MainWindow::addFilesToPlaylist(QStringList files) reloadPlaylists(); } -void MainWindow::onGridItemClicked() +void MainWindow::onGridItemClicked(ThumbnailWidget *widget) { QHash hash; ThumbnailWidget *w = static_cast(sender()); if (!w) - return; + { + if (widget) + w = widget; + else + return; + } if (m_currentGridWidget) { @@ -4349,11 +4354,26 @@ void MainWindow::initContentGridLayout() void MainWindow::onContentGridInited() { + ThumbnailWidget *thumbnailWidget = NULL; + m_gridLayoutWidget->resize(m_gridScrollArea->viewport()->size()); onZoomValueChanged(m_zoomSlider->value()); onSearchEnterPressed(); + + if (m_gridItems.count() > 0) + { + GridItem *gridItem = m_gridItems.at(0); + + if (gridItem) + { + thumbnailWidget = m_gridItems.at(0)->widget.data(); + + if (thumbnailWidget) + onGridItemClicked(thumbnailWidget); + } + } } void MainWindow::initContentTableWidget() diff --git a/ui/drivers/ui_qt.cpp b/ui/drivers/ui_qt.cpp index d398475856..690635a4aa 100644 --- a/ui/drivers/ui_qt.cpp +++ b/ui/drivers/ui_qt.cpp @@ -224,8 +224,10 @@ static void* ui_companion_qt_init(void) QMenu *editMenu = NULL; QMenu *viewMenu = NULL; QMenu *viewClosedDocksMenu = NULL; +#ifdef Q_OS_WIN QMenu *toolsMenu = NULL; QMenu *updaterMenu = NULL; +#endif QMenu *helpMenu = NULL; QRect desktopRect; QDockWidget *thumbnailDock = NULL; @@ -325,9 +327,9 @@ static void* ui_companion_qt_init(void) viewMenu->addSeparator(); viewMenu->addAction(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS), mainwindow->viewOptionsDialog(), SLOT(showDialog())); +#ifdef Q_OS_WIN toolsMenu = menu->addMenu(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_MENU_TOOLS)); updaterMenu = toolsMenu->addMenu(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ONLINE_UPDATER)); -#ifdef Q_OS_WIN updaterMenu->addAction(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_UPDATE_RETROARCH_NIGHTLY), mainwindow, SLOT(updateRetroArchNightly())); #endif helpMenu = menu->addMenu(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_MENU_HELP)); diff --git a/ui/drivers/ui_qt.h b/ui/drivers/ui_qt.h index 2347e73161..0b7d554f3f 100644 --- a/ui/drivers/ui_qt.h +++ b/ui/drivers/ui_qt.h @@ -431,7 +431,7 @@ private slots: void onUpdateGridItemPixmapFromImage(GridItem *item); void onPendingItemUpdates(); void onGridItemDoubleClicked(); - void onGridItemClicked(); + void onGridItemClicked(ThumbnailWidget *thumbnailWidget = NULL); void onPlaylistFilesDropped(QStringList files); void onUpdateNetworkError(QNetworkReply::NetworkError code); void onUpdateNetworkSslErrors(const QList &errors);