Merge remote-tracking branch 'refs/remotes/origin/theme_v2' into theme_v2

This commit is contained in:
ITotalJustice
2025-01-12 22:48:02 +00:00
11 changed files with 22 additions and 21 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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,

View File

@@ -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 },

View File

@@ -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

View File

@@ -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));
}
}

View File

@@ -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));
}
}

View File

@@ -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);

View File

@@ -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));
}

View File

@@ -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);