Adress feedback

This commit is contained in:
iota97 committed 2022-02-12 18:30:55 +01:00
1 parent 9ac07a10f6
commit 65b7b65bcd
3 files changed
+9 -9

No files matched your search

+8 -7
View File
@@ -24,6 +24,7 @@
#include "Common/File/FileUtil.h"
#include "Common/File/VFS/VFS.h"
#include "Common/Data/Format/IniFile.h"
#include "Common/File/DirListing.h"
#include "Core/Config.h"
@@ -31,7 +32,7 @@
#include "Common/UI/Context.h"
#include "Core/System.h"
struct themeInfo {
struct ThemeInfo {
std::string name;
uint32_t uItemStyleFg = 0xFFFFFFFF;
@@ -66,21 +67,21 @@ struct themeInfo {
bool operator == (const std::string &other) {
return name == other;
}
bool operator == (const themeInfo &other) {
bool operator == (const ThemeInfo &other) {
return name == other.name;
}
};
static UI::Theme ui_theme;
static std::vector<themeInfo> themeInfos;
static std::vector<ThemeInfo> themeInfos;
static void LoadThemeInfo(const std::vector<Path> &directories) {
themeInfos.clear();
themeInfo def{};
ThemeInfo def{};
def.name = "Default";
themeInfos.push_back(def);
auto appendTheme = [&](const themeInfo &info) {
auto appendTheme = [&](const ThemeInfo &info) {
auto beginErase = std::remove(themeInfos.begin(), themeInfos.end(), info.name);
if (beginErase != themeInfos.end()) {
themeInfos.erase(beginErase, themeInfos.end());
@@ -118,7 +119,7 @@ static void LoadThemeInfo(const std::vector<Path> &directories) {
// Alright, let's loop through the sections and see if any is a themes.
for (size_t i = 0; i < ini.Sections().size(); i++) {
Section &section = ini.Sections()[i];
themeInfo info;
ThemeInfo info;
section.Get("Name", &info.name, section.name().c_str());
section.Get("ItemStyleFg", &info.uItemStyleFg, 0xFFFFFFFF);
@@ -156,7 +157,7 @@ static void LoadThemeInfo(const std::vector<Path> &directories) {
}
}
static UI::Style MakeStyle (uint32_t fg, uint32_t bg) {
static UI::Style MakeStyle(uint32_t fg, uint32_t bg) {
UI::Style s;
s.background = UI::Drawable(bg);
s.fgColor = fg;
-1
View File
@@ -17,7 +17,6 @@
// Official git repository and contact information can be found at
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
#include "Common/File/DirListing.h"
#include "Common/UI/Context.h"
void ReloadAllThemeInfo();
+1 -1
View File
@@ -102,7 +102,7 @@
<ClInclude Include="TouchControlLayoutScreen.h" />
<ClInclude Include="TouchControlVisibilityScreen.h" />
<ClInclude Include="InstallZipScreen.h" />
<ClCompile Include="Theme.h" />
<ClInclude Include="Theme.h" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ext\discord-rpc-build\discord-rpc.vcxproj">