diff --git a/assets/romfs/themes/abyss_theme.ini b/assets/romfs/themes/abyss_theme.ini index cb37fd0..e66a1dd 100644 --- a/assets/romfs/themes/abyss_theme.ini +++ b/assets/romfs/themes/abyss_theme.ini @@ -13,11 +13,11 @@ line = 0xffbc41 line_seperator = 0xffbc41 text = 0xffbc41 -text_info = 0xffbc41 +text_info = 0xd79f36 text_selected = 0x529cff selected_background = 0x0f115c -scrollbar = 0x3250f0 +scrollbar = 0x529cff scrollbar_background = ; hide the background progressbar = 0x3250f0 diff --git a/assets/romfs/themes/base_black_theme.ini b/assets/romfs/themes/base_black_theme.ini index 3f61226..2af43d6 100644 --- a/assets/romfs/themes/base_black_theme.ini +++ b/assets/romfs/themes/base_black_theme.ini @@ -1,16 +1,16 @@ [theme] background = 0x2d2d2d grid = 0x46464630 -popup = 0x464646 +popup = 0x2d2d2d error = 0xfa5a3a line = 0xfbfbfb -line_seperator = 0xd1d1d1 +line_separator = 0x707070 text = 0xfbfbfb text_info = 0xd1d1d1 text_selected = 0x00ffc8 -selected_background = 0x464646 +selected_background = 0x212227 sidebar = 0x000000dc diff --git a/assets/romfs/themes/base_white_theme.ini b/assets/romfs/themes/base_white_theme.ini index ce0011d..a3cdc6d 100644 --- a/assets/romfs/themes/base_white_theme.ini +++ b/assets/romfs/themes/base_white_theme.ini @@ -1,11 +1,11 @@ [theme] -background = 0xececec -grid = 0xf1f1f1 -popup = 0xf1f1f1 +background = 0xebebeb +grid = 0xf0f0f0 +popup = 0xebebeb error = 0xfa5a3a line = 0x373737 -line_seperator = 0x373737 +line_separator = 0x6d787a text = 0x373737 text_info = 0x808080 @@ -24,7 +24,7 @@ progressbar_background = 0x808080 highlight_1 = 0x1989c6 highlight_2 = 0x89f0f2 -icon_colour = 0x6f7779 +icon_colour = 0x6d787a icon_audio = romfs:/theme/icon_audio.png icon_video = romfs:/theme/icon_video.png icon_image = romfs:/theme/icon_image.png diff --git a/sphaira/include/ui/types.hpp b/sphaira/include/ui/types.hpp index a8b68d2..4d5135e 100644 --- a/sphaira/include/ui/types.hpp +++ b/sphaira/include/ui/types.hpp @@ -182,7 +182,7 @@ enum ThemeEntryID { // colour of line separators in a list. ThemeEntryID_LINE, - ThemeEntryID_LINE_SEPERATOR, + ThemeEntryID_LINE_SEPARATOR, // colour of the sidebar backrgound. ThemeEntryID_SIDEBAR, diff --git a/sphaira/source/app.cpp b/sphaira/source/app.cpp index 7174670..df7a402 100644 --- a/sphaira/source/app.cpp +++ b/sphaira/source/app.cpp @@ -52,9 +52,10 @@ constexpr ThemeIdPair THEME_ENTRIES[] = { { "text_info", ThemeEntryID_TEXT_INFO, ElementType::Colour }, { "text_selected", ThemeEntryID_TEXT_SELECTED, ElementType::Colour }, { "selected_background", ThemeEntryID_SELECTED_BACKGROUND, ElementType::Colour }, + { "error", ThemeEntryID_ERROR, ElementType::Colour }, { "popup", ThemeEntryID_POPUP, ElementType::Colour }, { "line", ThemeEntryID_LINE, ElementType::Colour }, - { "line_seperator", ThemeEntryID_LINE_SEPERATOR, ElementType::Colour }, + { "line_separator", ThemeEntryID_LINE_SEPARATOR, ElementType::Colour }, { "sidebar", ThemeEntryID_SIDEBAR, ElementType::Colour }, { "scrollbar", ThemeEntryID_SCROLLBAR, ElementType::Colour }, { "scrollbar_background", ThemeEntryID_SCROLLBAR_BACKGROUND, ElementType::Colour }, diff --git a/sphaira/source/ui/error_box.cpp b/sphaira/source/ui/error_box.cpp index c35b61b..108b72d 100644 --- a/sphaira/source/ui/error_box.cpp +++ b/sphaira/source/ui/error_box.cpp @@ -1147,7 +1147,7 @@ auto ErrorBox::Draw(NVGcontext* vg, Theme* theme) -> void { gfx::drawTextArgs(vg, center_x, 380, 20, NVG_ALIGN_CENTER | NVG_ALIGN_TOP, theme->GetColour(ThemeEntryID_TEXT_INFO), "If this message appears repeatedly, please open an issue."_i18n.c_str()); gfx::drawTextArgs(vg, center_x, 415, 20, NVG_ALIGN_CENTER | NVG_ALIGN_TOP, theme->GetColour(ThemeEntryID_TEXT_INFO), "https://github.com/ITotalJustice/sphaira/issues"); gfx::drawRectOutline(vg, theme, 4.f, box); - gfx::drawTextArgs(vg, center_x, box.y + box.h/2, 23, NVG_ALIGN_CENTER | NVG_ALIGN_MIDDLE, theme->GetColour(ThemeEntryID_TEXT), "OK"_i18n.c_str()); + gfx::drawTextArgs(vg, center_x, box.y + box.h/2, 23, NVG_ALIGN_CENTER | NVG_ALIGN_MIDDLE, theme->GetColour(ThemeEntryID_TEXT_SELECTED), "OK"_i18n.c_str()); } } // namespace sphaira::ui diff --git a/sphaira/source/ui/menus/filebrowser.cpp b/sphaira/source/ui/menus/filebrowser.cpp index 3eb8f60..7bde01c 100644 --- a/sphaira/source/ui/menus/filebrowser.cpp +++ b/sphaira/source/ui/menus/filebrowser.cpp @@ -581,7 +581,7 @@ void Menu::Draw(NVGcontext* vg, Theme* theme) { const auto& text_col = theme->GetColour(ThemeEntryID_TEXT); if (m_entries_current.empty()) { - gfx::drawTextArgs(vg, SCREEN_WIDTH / 2.f, SCREEN_HEIGHT / 2.f, 36.f, NVG_ALIGN_CENTER | NVG_ALIGN_MIDDLE, text_col, "Empty..."_i18n.c_str()); + gfx::drawTextArgs(vg, SCREEN_WIDTH / 2.f, SCREEN_HEIGHT / 2.f, 36.f, NVG_ALIGN_CENTER | NVG_ALIGN_MIDDLE, theme->GetColour(ThemeEntryID_TEXT_INFO), "Empty..."_i18n.c_str()); return; } @@ -605,7 +605,7 @@ void Menu::Draw(NVGcontext* vg, Theme* theme) { } if (e.IsSelected()) { - gfx::drawText(vg, Vec2{x, y + (h / 2.f) - (24.f / 2)}, 24.f, "\uE14B", nullptr, NVG_ALIGN_RIGHT | NVG_ALIGN_TOP, theme->GetColour(ThemeEntryID_TEXT_SELECTED)); + gfx::drawText(vg, Vec2{x - 10.f, y + (h / 2.f) - (24.f / 2)}, 24.f, "\uE14B", nullptr, NVG_ALIGN_RIGHT | NVG_ALIGN_TOP, theme->GetColour(ThemeEntryID_TEXT_SELECTED)); } auto text_id = ThemeEntryID_TEXT; @@ -614,7 +614,7 @@ void Menu::Draw(NVGcontext* vg, Theme* theme) { gfx::drawRectOutline(vg, theme, 4.f, v); } else { if (i != m_entries_current.size() - 1) { - gfx::drawRect(vg, Vec4{x, y + h, w, 1.f}, theme->GetColour(ThemeEntryID_LINE_SEPERATOR)); + gfx::drawRect(vg, Vec4{x, y + h, w, 1.f}, theme->GetColour(ThemeEntryID_LINE_SEPARATOR)); } } diff --git a/sphaira/source/ui/menus/ghdl.cpp b/sphaira/source/ui/menus/ghdl.cpp index 2414b4a..c161235 100644 --- a/sphaira/source/ui/menus/ghdl.cpp +++ b/sphaira/source/ui/menus/ghdl.cpp @@ -389,7 +389,7 @@ void Menu::Draw(NVGcontext* vg, Theme* theme) { const auto& text_col = theme->GetColour(ThemeEntryID_TEXT); if (m_entries.empty()) { - gfx::drawTextArgs(vg, SCREEN_WIDTH / 2.f, SCREEN_HEIGHT / 2.f, 36.f, NVG_ALIGN_CENTER | NVG_ALIGN_MIDDLE, text_col, "Empty..."_i18n.c_str()); + gfx::drawTextArgs(vg, SCREEN_WIDTH / 2.f, SCREEN_HEIGHT / 2.f, 36.f, NVG_ALIGN_CENTER | NVG_ALIGN_MIDDLE, theme->GetColour(ThemeEntryID_TEXT_INFO), "Empty..."_i18n.c_str()); return; } @@ -405,7 +405,7 @@ void Menu::Draw(NVGcontext* vg, Theme* theme) { gfx::drawRectOutline(vg, theme, 4.f, v); } else { if (i != m_entries.size() - 1) { - gfx::drawRect(vg, x, y + h, w, 1.f, theme->GetColour(ThemeEntryID_LINE_SEPERATOR)); + gfx::drawRect(vg, x, y + h, w, 1.f, theme->GetColour(ThemeEntryID_LINE_SEPARATOR)); } } diff --git a/sphaira/source/ui/option_box.cpp b/sphaira/source/ui/option_box.cpp index 9b3cb44..adff8b4 100644 --- a/sphaira/source/ui/option_box.cpp +++ b/sphaira/source/ui/option_box.cpp @@ -101,7 +101,7 @@ auto OptionBox::Draw(NVGcontext* vg, Theme* theme) -> void { gfx::drawTextBox(vg, m_pos.x + padding, m_pos.y + 110.f, 26.f, m_pos.w - padding*2, theme->GetColour(ThemeEntryID_TEXT), m_message.c_str(), NVG_ALIGN_CENTER | NVG_ALIGN_MIDDLE); nvgRestore(vg); - gfx::drawRect(vg, m_spacer_line, theme->GetColour(ThemeEntryID_LINE)); + gfx::drawRect(vg, m_spacer_line, theme->GetColour(ThemeEntryID_LINE_SEPARATOR)); for (auto&p: m_entries) { p.Draw(vg, theme); diff --git a/sphaira/source/ui/popup_list.cpp b/sphaira/source/ui/popup_list.cpp index 0a33b76..48bf462 100644 --- a/sphaira/source/ui/popup_list.cpp +++ b/sphaira/source/ui/popup_list.cpp @@ -123,7 +123,7 @@ auto PopupList::Draw(NVGcontext* vg, Theme* theme) -> void { gfx::drawText(vg, x + m_text_xoffset, y + (h / 2.f), 20.f, m_items[i].c_str(), NULL, NVG_ALIGN_LEFT | NVG_ALIGN_MIDDLE, theme->GetColour(ThemeEntryID_TEXT_SELECTED)); } else { if (i != m_items.size() - 1) { - gfx::drawRect(vg, x, y + h, w, 1.f, theme->GetColour(ThemeEntryID_LINE_SEPERATOR)); + gfx::drawRect(vg, x, y + h, w, 1.f, theme->GetColour(ThemeEntryID_LINE_SEPARATOR)); } gfx::drawText(vg, x + m_text_xoffset, y + (h / 2.f), 20.f, m_items[i].c_str(), NULL, NVG_ALIGN_LEFT | NVG_ALIGN_MIDDLE, theme->GetColour(ThemeEntryID_TEXT)); } diff --git a/sphaira/source/ui/sidebar.cpp b/sphaira/source/ui/sidebar.cpp index 09bc19c..74f8dc0 100644 --- a/sphaira/source/ui/sidebar.cpp +++ b/sphaira/source/ui/sidebar.cpp @@ -229,7 +229,7 @@ auto Sidebar::Draw(NVGcontext* vg, Theme* theme) -> void { const auto& [x, y, w, h] = v; if (i != m_items.size() - 1) { - gfx::drawRect(vg, x, y + h, w, 1.f, theme->GetColour(ThemeEntryID_LINE_SEPERATOR)); + gfx::drawRect(vg, x, y + h, w, 1.f, theme->GetColour(ThemeEntryID_LINE_SEPARATOR)); } m_items[i]->SetY(y);