diff options
author | ADudeCalledLeo <7997354+Leo40Git@users.noreply.github.com> | 2022-10-25 17:37:30 +0300 |
---|---|---|
committer | ADudeCalledLeo <7997354+Leo40Git@users.noreply.github.com> | 2022-11-12 20:19:26 +0200 |
commit | f12117c532de4bdbf74968cf173d1c288a7e426a (patch) | |
tree | c217e038aea452d43eb12d95a0ff4e44539f9342 | |
parent | 70768189bae0f4d5cfb24b57347cf7207dfc5496 (diff) | |
download | PrismLauncher-f12117c532de4bdbf74968cf173d1c288a7e426a.tar.gz PrismLauncher-f12117c532de4bdbf74968cf173d1c288a7e426a.tar.bz2 PrismLauncher-f12117c532de4bdbf74968cf173d1c288a7e426a.zip |
[UNTESTED] Linux: add icons to shortcuts
Signed-off-by: ADudeCalledLeo <7997354+Leo40Git@users.noreply.github.com>
-rw-r--r-- | launcher/ui/MainWindow.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/launcher/ui/MainWindow.cpp b/launcher/ui/MainWindow.cpp index 1ad9713a..8f2196f2 100644 --- a/launcher/ui/MainWindow.cpp +++ b/launcher/ui/MainWindow.cpp @@ -2104,6 +2104,8 @@ void MainWindow::on_actionCreateInstanceShortcut_triggered() // TODO actually write this path QMessageBox::critical(this, tr("Create instance shortcut"), tr("Not supported on macOSX yet!")); #else + auto icon = APPLICATION->icons()->icon(m_selectedInstance->iconKey()); + QString iconPath; #if defined(Q_OS_WIN) @@ -2111,7 +2113,7 @@ void MainWindow::on_actionCreateInstanceShortcut_triggered() // need to convert icon to ICO format and save it somewhere... iconPath = ""; #elif defined(Q_OS_UNIX) - iconPath = ""; // TODO get instance icon path + iconPath = icon->getFilePath(); #endif if (FS::createShortcut(FS::PathCombine(desktopPath, m_selectedInstance->name()), QApplication::applicationFilePath(), { "--launch", m_selectedInstance->id() }, m_selectedInstance->name(), iconPath)) { |