From 65b7b65bcd139d83bd5084dcaff65a662e7d9c2c Mon Sep 17 00:00:00 2001 From: iota97 Date: Sat, 12 Feb 2022 18:30:55 +0100 Subject: [PATCH] Adress feedback --- UI/Theme.cpp | 15 ++++++++------- UI/Theme.h | 1 - UI/UI.vcxproj | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/UI/Theme.cpp b/UI/Theme.cpp index 51659270b6..2c600d0bb3 100644 --- a/UI/Theme.cpp +++ b/UI/Theme.cpp @@ -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 themeInfos; +static std::vector themeInfos; static void LoadThemeInfo(const std::vector &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 &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 §ion = 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 &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; diff --git a/UI/Theme.h b/UI/Theme.h index 71a697fd83..9259313606 100644 --- a/UI/Theme.h +++ b/UI/Theme.h @@ -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(); diff --git a/UI/UI.vcxproj b/UI/UI.vcxproj index 3264c2878f..666e35aa02 100644 --- a/UI/UI.vcxproj +++ b/UI/UI.vcxproj @@ -102,7 +102,7 @@ - +