diff --git a/Common/UI/View.h b/Common/UI/View.h index dff0205e9f..65a7f55270 100644 --- a/Common/UI/View.h +++ b/Common/UI/View.h @@ -88,7 +88,6 @@ struct FontStyle { int flags = 0; }; - // To use with an UI atlas. struct Theme { FontStyle uiFont; diff --git a/UI/Theme.cpp b/UI/Theme.cpp index f71cf13e08..4ed0e6cbd3 100644 --- a/UI/Theme.cpp +++ b/UI/Theme.cpp @@ -48,6 +48,7 @@ struct ThemeInfo { uint32_t uHeaderStyleFg = 0xFFFFFFFF; uint32_t uInfoStyleFg = 0xFFFFFFFF; uint32_t uInfoStyleBg = 0x00000000; + uint32_t uPopupStyleFg = 0xFFFFFFFF; uint32_t uPopupStyleBg = 0xFF303030; uint32_t uBackgroundColor = 0xFF754D24; @@ -134,6 +135,7 @@ static void LoadThemeInfo(const std::vector &directories) { section.Get("HeaderStyleFg", &info.uHeaderStyleFg, info.uHeaderStyleFg); section.Get("InfoStyleFg", &info.uInfoStyleFg, info.uInfoStyleFg); section.Get("InfoStyleBg", &info.uInfoStyleBg, info.uInfoStyleBg); + section.Get("PopupStyleFg", &info.uPopupStyleBg, info.uItemStyleFg); // Backwards compat section.Get("PopupStyleBg", &info.uPopupStyleBg, info.uPopupStyleBg); section.Get("BackgroundColor", &info.uBackgroundColor, info.uBackgroundColor); @@ -225,7 +227,7 @@ void UpdateTheme(UIContext *ctx) { ui_theme.headerStyle.fgColor = themeInfos[i].uHeaderStyleFg; ui_theme.infoStyle = MakeStyle(themeInfos[i].uInfoStyleFg, themeInfos[i].uInfoStyleBg); - ui_theme.popupStyle = MakeStyle(themeInfos[i].uItemStyleFg, themeInfos[i].uPopupStyleBg); + ui_theme.popupStyle = MakeStyle(themeInfos[i].uPopupStyleFg, themeInfos[i].uPopupStyleBg); ui_theme.backgroundColor = themeInfos[i].uBackgroundColor; // Load any missing atlas metadata (the images are loaded from UIContext). diff --git a/assets/themes/1995.ini b/assets/themes/1995.ini index 6f1c91f701..992222a4a8 100644 --- a/assets/themes/1995.ini +++ b/assets/themes/1995.ini @@ -23,6 +23,7 @@ ItemDisabledStyleBg = "#C0C0C0FF" HeaderStyleFg = "#FFFFFFFF" InfoStyleFg = "#FFFFFFFF" InfoStyleBg = "#00000000" +PopupStyleFg = "#000000FF" PopupStyleBg = "#FFFFAAFF" BackgroundColor = "#008080FF" UIAtlas = "../ui_atlas" diff --git a/assets/themes/defaultthemes.ini b/assets/themes/defaultthemes.ini index ff36fb8047..0ed74b3f3d 100644 --- a/assets/themes/defaultthemes.ini +++ b/assets/themes/defaultthemes.ini @@ -11,6 +11,7 @@ ItemDisabledStyleBg = "#00000055" HeaderStyleFg = "#FFFFFFFF" InfoStyleFg = "#FFFFFFFF" InfoStyleBg = "#00000000" +PopupStyleFg = "#FFFFFFFF" PopupStyleBg = "#1f4d5eFF" BackgroundColor = "#244D75FF" UIAtlas = "../ui_atlas" @@ -32,6 +33,7 @@ ItemDisabledStyleBg = "#1b1c1c55" HeaderStyleFg = "#FFFFFFFF" InfoStyleFg = "#FFFFFFFF" InfoStyleBg = "#00000000" +PopupStyleFg = "#FFFFFFFF" PopupStyleBg = "#0c1d24FF" BackgroundColor = "#000000FF" UIAtlas = "../ui_atlas" diff --git a/assets/themes/slateforest.ini b/assets/themes/slateforest.ini index 412ee75f93..a9421801e5 100644 --- a/assets/themes/slateforest.ini +++ b/assets/themes/slateforest.ini @@ -21,6 +21,7 @@ ItemDisabledStyleBg = "#00000055" HeaderStyleFg = "#FFFFFFFF" InfoStyleFg = "#FFFFFFFF" InfoStyleBg = "#00000000" +PopupStyleFg = "#FFFFFFFF" PopupStyleBg = "#9498A1FF" BackgroundColor = "#122537FF" UIAtlas = "../ui_atlas" diff --git a/assets/themes/vinewood.ini b/assets/themes/vinewood.ini index 3f5310176c..7600b6039c 100644 --- a/assets/themes/vinewood.ini +++ b/assets/themes/vinewood.ini @@ -22,6 +22,7 @@ ItemDisabledStyleBg = "#000000FF" HeaderStyleFg = "#FFFFFFFF" InfoStyleFg = "#FFFFFFFF" InfoStyleBg = "#00000000" +PopupStyleFg = "#C3D7A4FF" PopupStyleBg = "#94B185FF" BackgroundColor = "#62865AFF" UIAtlas = "../ui_atlas"