diff options
Diffstat (limited to 'launcher/ui')
-rw-r--r-- | launcher/ui/pages/global/LauncherPage.cpp | 3 | ||||
-rw-r--r-- | launcher/ui/themes/CustomTheme.cpp | 22 | ||||
-rw-r--r-- | launcher/ui/themes/CustomTheme.h | 6 | ||||
-rw-r--r-- | launcher/ui/themes/SystemTheme.cpp | 6 | ||||
-rw-r--r-- | launcher/ui/themes/ThemeManager.cpp | 2 | ||||
-rw-r--r-- | launcher/ui/themes/ThemeManager.h | 2 |
6 files changed, 13 insertions, 28 deletions
diff --git a/launcher/ui/pages/global/LauncherPage.cpp b/launcher/ui/pages/global/LauncherPage.cpp index a1cbbc33..7c7aaf4e 100644 --- a/launcher/ui/pages/global/LauncherPage.cpp +++ b/launcher/ui/pages/global/LauncherPage.cpp @@ -1,8 +1,9 @@ // SPDX-License-Identifier: GPL-3.0-only /* - * PolyMC - Minecraft Launcher + * Prism Launcher - Minecraft Launcher * Copyright (c) 2022 Jamie Mansfield <jmansfield@cadixdev.org> * Copyright (c) 2022 dada513 <dada513@protonmail.com> + * Copyright (C) 2022 Tayou <tayou@gmx.net> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/launcher/ui/themes/CustomTheme.cpp b/launcher/ui/themes/CustomTheme.cpp index c346d42f..a61bdbaf 100644 --- a/launcher/ui/themes/CustomTheme.cpp +++ b/launcher/ui/themes/CustomTheme.cpp @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-3.0-only /* - * Prism Launcher + * Prism Launcher - Minecraft Launcher * Copyright (C) 2022 Tayou <tayou@gmx.net> * * This program is free software: you can redistribute it and/or modify @@ -20,10 +20,6 @@ * * Copyright 2013-2021 MultiMC Contributors * - * Authors: Andrew Okin - * Peterix - * Orochimarufan <orochimarufan.x3@gmail.com> - * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -56,7 +52,6 @@ static bool readThemeJson(const QString &path, QPalette &palette, double &fadeAm name = Json::requireString(root, "name", "Theme name"); widgets = Json::requireString(root, "widgets", "Qt widget theme"); qssFilePath = Json::ensureString(root, "qssFilePath", "themeStyle.css"); - //auto colorFileList = Json::ensureArray(root, "colorFiles"); auto colorsRoot = Json::requireObject(root, "colors", "colors object"); auto readColor = [&](QString colorName) -> QColor { @@ -165,7 +160,6 @@ static bool writeThemeJson(const QString &path, const QPalette &palette, double } } -/// @brief /// @param baseTheme Base Theme /// @param fileInfo FileInfo object for file to load /// @param isManifest whether to load a theme manifest or a qss file @@ -199,8 +193,6 @@ CustomTheme::CustomTheme(ITheme* baseTheme, QFileInfo& fileInfo, bool isManifest m_fadeAmount = baseTheme->fadeAmount(); m_widgets = baseTheme->qtTheme(); m_qssFilePath = "themeStyle.css"; - - QFileInfo info(themeFilePath); } else { @@ -212,18 +204,18 @@ CustomTheme::CustomTheme(ITheme* baseTheme, QFileInfo& fileInfo, bool isManifest writeThemeJson(fileInfo.absoluteFilePath(), m_palette, m_fadeAmount, m_fadeColor, m_name, m_widgets, m_qssFilePath); } - auto cssFilePath = FS::PathCombine(path, m_qssFilePath); - QFileInfo info (cssFilePath); + auto qssFilePath = FS::PathCombine(path, m_qssFilePath); + QFileInfo info (qssFilePath); if(info.isFile()) { try { // TODO: validate css? - m_styleSheet = QString::fromUtf8(FS::read(cssFilePath)); + m_styleSheet = QString::fromUtf8(FS::read(qssFilePath)); } catch (const Exception &e) { - themeWarningLog() << "Couldn't load css:" << e.cause() << "from" << cssFilePath; + themeWarningLog() << "Couldn't load css:" << e.cause() << "from" << qssFilePath; m_styleSheet = baseTheme->appStyleSheet(); } } @@ -233,11 +225,11 @@ CustomTheme::CustomTheme(ITheme* baseTheme, QFileInfo& fileInfo, bool isManifest m_styleSheet = baseTheme->appStyleSheet(); try { - FS::write(cssFilePath, m_styleSheet.toUtf8()); + FS::write(qssFilePath, m_styleSheet.toUtf8()); } catch (const Exception &e) { - themeWarningLog() << "Couldn't write css:" << e.cause() << "to" << cssFilePath; + themeWarningLog() << "Couldn't write css:" << e.cause() << "to" << qssFilePath; } } } else { diff --git a/launcher/ui/themes/CustomTheme.h b/launcher/ui/themes/CustomTheme.h index 6d1f46b4..e845d23d 100644 --- a/launcher/ui/themes/CustomTheme.h +++ b/launcher/ui/themes/CustomTheme.h @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-3.0-only /* - * Prism Launcher + * Prism Launcher - Minecraft Launcher * Copyright (C) 2022 Tayou <tayou@gmx.net> * * This program is free software: you can redistribute it and/or modify @@ -20,10 +20,6 @@ * * Copyright 2013-2021 MultiMC Contributors * - * Authors: Andrew Okin - * Peterix - * Orochimarufan <orochimarufan.x3@gmail.com> - * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/launcher/ui/themes/SystemTheme.cpp b/launcher/ui/themes/SystemTheme.cpp index ec24c6d7..a63d1741 100644 --- a/launcher/ui/themes/SystemTheme.cpp +++ b/launcher/ui/themes/SystemTheme.cpp @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-3.0-only /* - * Prism Launcher + * Prism Launcher - Minecraft Launcher * Copyright (C) 2022 Tayou <tayou@gmx.net> * * This program is free software: you can redistribute it and/or modify @@ -20,10 +20,6 @@ * * Copyright 2013-2021 MultiMC Contributors * - * Authors: Andrew Okin - * Peterix - * Orochimarufan <orochimarufan.x3@gmail.com> - * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/launcher/ui/themes/ThemeManager.cpp b/launcher/ui/themes/ThemeManager.cpp index 3c338fd6..4b7cd46d 100644 --- a/launcher/ui/themes/ThemeManager.cpp +++ b/launcher/ui/themes/ThemeManager.cpp @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-3.0-only
/*
- * Prism Launcher
+ * Prism Launcher - Minecraft Launcher
* Copyright (C) 2022 Tayou <tayou@gmx.net>
*
* This program is free software: you can redistribute it and/or modify
diff --git a/launcher/ui/themes/ThemeManager.h b/launcher/ui/themes/ThemeManager.h index 871e6fe2..96088d82 100644 --- a/launcher/ui/themes/ThemeManager.h +++ b/launcher/ui/themes/ThemeManager.h @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-3.0-only
/*
- * Prism Launcher
+ * Prism Launcher - Minecraft Launcher
* Copyright (C) 2022 Tayou <tayou@gmx.net>
*
* This program is free software: you can redistribute it and/or modify
|