Skip to content

Commit

Permalink
Qt: Fix low-resolution icon
Browse files Browse the repository at this point in the history
  • Loading branch information
spycrab committed Mar 27, 2018
1 parent 5c83e18 commit b7ea881
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ if(CMAKE_SYSTEM_NAME MATCHES "Linux|FreeBSD|OpenBSD")
install(FILES Data/dolphin-emu.svg
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/apps)
install(FILES Data/dolphin-emu.png
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/48x48/apps)
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/256x256/apps)
install(FILES Data/dolphin-emu.desktop
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications)
# Install manpages
Expand Down
Binary file modified Data/dolphin-emu.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion Source/Core/DolphinQt2/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
MainWindow::MainWindow(std::unique_ptr<BootParameters> boot_parameters) : QMainWindow(nullptr)
{
setWindowTitle(QString::fromStdString(Common::scm_rev_str));
setWindowIcon(QIcon(Resources::GetMisc(Resources::LOGO_SMALL)));
setWindowIcon(Resources::GetAppIcon());
setUnifiedTitleAndToolBarOnMac(true);
setAcceptDrops(true);

Expand Down
10 changes: 10 additions & 0 deletions Source/Core/DolphinQt2/Resources.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,13 @@ QPixmap Resources::GetMisc(int id)
{
return m_misc[id];
}

QIcon Resources::GetAppIcon()
{
QIcon icon;

icon.addPixmap(GetScaledPixmap("dolphin_logo"));
icon.addPixmap(GetScaledPixmap("Dolphin"));

return icon;
}
1 change: 1 addition & 0 deletions Source/Core/DolphinQt2/Resources.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class Resources final

static QIcon GetScaledIcon(const std::string& name);
static QIcon GetScaledThemeIcon(const std::string& name);
static QIcon GetAppIcon();

static QPixmap GetScaledPixmap(const std::string& name);
static QPixmap GetScaledThemePixmap(const std::string& name);
Expand Down

0 comments on commit b7ea881

Please sign in to comment.