fix hardcoded svg path

This commit is contained in:
fn2006 2022-10-29 14:03:44 +01:00
parent 765fb42a7e
commit 0f581efda5
4 changed files with 4 additions and 2 deletions

View File

@ -48,6 +48,7 @@ Config::Config()
LAUNCHER_CONFIGFILE = "@Launcher_ConfigFile@"; LAUNCHER_CONFIGFILE = "@Launcher_ConfigFile@";
LAUNCHER_GIT = "@Launcher_Git@"; LAUNCHER_GIT = "@Launcher_Git@";
LAUNCHER_DESKTOPFILENAME = "@Launcher_DesktopFileName@"; LAUNCHER_DESKTOPFILENAME = "@Launcher_DesktopFileName@";
LAUNCHER_SVGFILENAME = "@Launcher_SVGFileName@";
USER_AGENT = "@Launcher_UserAgent@"; USER_AGENT = "@Launcher_UserAgent@";
USER_AGENT_UNCACHED = USER_AGENT + " (Uncached)"; USER_AGENT_UNCACHED = USER_AGENT + " (Uncached)";

View File

@ -50,6 +50,7 @@ class Config {
QString LAUNCHER_CONFIGFILE; QString LAUNCHER_CONFIGFILE;
QString LAUNCHER_GIT; QString LAUNCHER_GIT;
QString LAUNCHER_DESKTOPFILENAME; QString LAUNCHER_DESKTOPFILENAME;
QString LAUNCHER_SVGFILENAME;
/// The major version number. /// The major version number.
int VERSION_MAJOR; int VERSION_MAJOR;

View File

@ -1168,8 +1168,7 @@ void Application::setIconTheme(const QString& name)
QIcon Application::getThemedIcon(const QString& name) QIcon Application::getThemedIcon(const QString& name)
{ {
if(name == "logo") { if(name == "logo") {
// why is this hardcoded lol return QIcon(":/" + BuildConfig.LAUNCHER_SVGFILENAME);
return QIcon(":/org.fn2006.PollyMC.svg");
} }
return QIcon::fromTheme(name); return QIcon::fromTheme(name);
} }

View File

@ -21,6 +21,7 @@ set(Launcher_UserAgent "PrismLauncher/${Launcher_RELEASE_VERSION_NAME}" PARENT_S
set(Launcher_ConfigFile "pollymc.cfg" PARENT_SCOPE) set(Launcher_ConfigFile "pollymc.cfg" PARENT_SCOPE)
set(Launcher_Git "https://github.com/fn2006/PollyMC" PARENT_SCOPE) set(Launcher_Git "https://github.com/fn2006/PollyMC" PARENT_SCOPE)
set(Launcher_DesktopFileName "org.fn2006.PollyMC.desktop" PARENT_SCOPE) set(Launcher_DesktopFileName "org.fn2006.PollyMC.desktop" PARENT_SCOPE)
set(Launcher_SVGFileName "org.fn2006.PollyMC.svg" PARENT_SCOPE)
set(Launcher_Desktop "program_info/org.fn2006.PollyMC.desktop" PARENT_SCOPE) set(Launcher_Desktop "program_info/org.fn2006.PollyMC.desktop" PARENT_SCOPE)
set(Launcher_MetaInfo "program_info/org.fn2006.PollyMC.metainfo.xml" PARENT_SCOPE) set(Launcher_MetaInfo "program_info/org.fn2006.PollyMC.metainfo.xml" PARENT_SCOPE)