From b4878a8e7b6dd78a16c398e383c277a2f478574c Mon Sep 17 00:00:00 2001 From: Omar Saleem Date: Sat, 16 Oct 2021 16:17:16 -0400 Subject: [PATCH] feat: solarized light ozone theme (#5) * feat: adding solarized dark theme to ozone * fix: variable not defined in header * fix: added string for selecting theme in menu * fix: added message hash for string * feat: copied solarized dark translations into msg hashes * fix: forgot to change name of enum label after copying * first pass of new colors * added selection border and fixed sublabel color * sublabel color from blue to muted gray * trying cyan for sublabel * adjusted selected text color to match philosophy from solarized website * testing what the entries_ colors do * chose colors for entries_, adjusted other border and bgs * match selection border to sublabel color * trying gray for sublabel * accidentally put the color in the wrong place, reverting and updating * trying to change selected option color to orange * not feeling orange, lets try teal * try for orange border * try for magenta border * try for violet border * trying blue border again * trying omar blue bc why not * reverting to regular blue for icons and green for border * try magenta for footer border * trying font color for footer border * trying to get message background to show * can't get it to render, but changed message background to violet * testing sidebar changes * sidebar colors * lighter sidebar color * trying gray sidebar * try a gradient * screwed up one of the coordinates * reversing gradient * attempting gradient with colors i made up * accidentally wrote gradient to dracula instead of solarized dark * adding gradient to the top, reversing bottom gradient * randomly trying shuffling bottom gradient coords * moving top right coordinate somewhere else * swapped top two bottom coords to see * swapped them back, i got lucky and things were right * think i figured out the order, BL, BR, TL, TR * making background gradient lil darker * fixed coords * lessening gradient effect * lessening gradient effect, but by making darker instead of lighter * of course, messed up two coords * removed top and bottom gradients * dark and flat sidebar * forgot to change running background * made running background a bit less transparent since this is a low contrast theme * added underscore to theme name * adjusting message background color * fixing message background color * fixed cursor color border * adjusting text to be one notch brighter, base0 -> base1, base01 -> base0 * adjusting sublabel text to use base00 instead, its in between base01 and base0 * added message hashes for light theme name * added defines and enums for the light theme * added solarized light structs into ozone.c, theyre all clones of dark for now * fixing solarized dark ozone theme fixing name of theme in ozone.c so assets load properly, fixing cursor and message colors to be green instead of purple * added message hashes for light theme name * added defines and enums for the light theme * added solarized light structs into ozone.c, theyre all clones of dark for now * i had based this branch on the wrong branch, fixed * first pass, only changing background and regular text * trying orange and magenta highlights * Revert "trying orange and magenta highlights" This reverts commit 1f1e107888cee0e97c6354a8d114863b39af8d00. * applying the new colors to the right theme this time :) * trying red instead of pink * trying magenta icons in a desperate attempt to justify the use of the color * trying magenta icons, orange labels and selector * back to orange and red, sigh * trying sidebar colors * fixing sidebar gradient * light theme red animated border colors * trying magenta for second border color * that was bad, trying a less light red * going even darker * made cursor border get darker instead of lighter * that was a little too dark * changed light theme running background to be..light --- intl/msg_hash_ar.h | 4 +++ intl/msg_hash_chs.h | 4 +++ intl/msg_hash_de.h | 4 +++ intl/msg_hash_es.h | 4 +++ intl/msg_hash_fi.h | 5 ++++ intl/msg_hash_fr.h | 5 ++++ intl/msg_hash_it.h | 4 +++ intl/msg_hash_ko.h | 4 +++ intl/msg_hash_pl.h | 4 +++ intl/msg_hash_pt_br.h | 4 +++ intl/msg_hash_ru.h | 4 +++ intl/msg_hash_tr.h | 4 +++ intl/msg_hash_uk.h | 4 +++ intl/msg_hash_us.h | 4 +++ menu/drivers/ozone.c | 70 ++++++++++++++++++++++++++++++++++++++++++- menu/menu_defines.h | 1 + menu/menu_setting.c | 5 ++++ msg_hash.h | 1 + 18 files changed, 134 insertions(+), 1 deletion(-) diff --git a/intl/msg_hash_ar.h b/intl/msg_hash_ar.h index 34aca43bdc..7d979775c4 100644 --- a/intl/msg_hash_ar.h +++ b/intl/msg_hash_ar.h @@ -6269,6 +6269,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_OZONE_COLOR_THEME_SOLARIZED_DARK, "الظلام المشمس" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_OZONE_COLOR_THEME_SOLARIZED_LIGHT, + "النور المشمس" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_LEFT_THUMBNAILS_OZONE, "الصورة المصغرة الثانية" diff --git a/intl/msg_hash_chs.h b/intl/msg_hash_chs.h index e6b7980098..4f30e1d7c3 100644 --- a/intl/msg_hash_chs.h +++ b/intl/msg_hash_chs.h @@ -8397,6 +8397,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_OZONE_COLOR_THEME_SOLARIZED_DARK, "暗色曝光" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_OZONE_COLOR_THEME_SOLARIZED_LIGHT, + "亮色曝光" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_LEFT_THUMBNAILS_OZONE, "第二缩略图" diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index 794aed5b2c..783ec76054 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -8309,6 +8309,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_OZONE_COLOR_THEME_SOLARIZED_DARK, "Solarized dunkel" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_OZONE_COLOR_THEME_SOLARIZED_LIGHT, + "Solarized hell" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_LEFT_THUMBNAILS_OZONE, "Zweites Vorschaubild" diff --git a/intl/msg_hash_es.h b/intl/msg_hash_es.h index 863a9b329b..6321f3f51a 100644 --- a/intl/msg_hash_es.h +++ b/intl/msg_hash_es.h @@ -8533,6 +8533,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_OZONE_COLOR_THEME_SOLARIZED_DARK, "Solarizado (oscuro)" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_OZONE_COLOR_THEME_SOLARIZED_LIGHT, + "Solarizado (claro)" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_LEFT_THUMBNAILS_OZONE, "Segunda miniatura" diff --git a/intl/msg_hash_fi.h b/intl/msg_hash_fi.h index 0ba00a65e6..7fd9a41a1b 100644 --- a/intl/msg_hash_fi.h +++ b/intl/msg_hash_fi.h @@ -8517,6 +8517,11 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_OZONE_COLOR_THEME_SOLARIZED_DARK, "Solarized, tumma" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_OZONE_COLOR_THEME_SOLARIZED_LIGHT, + "Solarized, vaalea" + ) + MSG_HASH( MENU_ENUM_LABEL_VALUE_LEFT_THUMBNAILS_OZONE, "Toinen esikatselukuva" diff --git a/intl/msg_hash_fr.h b/intl/msg_hash_fr.h index 066791949b..b5cddbfafd 100644 --- a/intl/msg_hash_fr.h +++ b/intl/msg_hash_fr.h @@ -8541,6 +8541,11 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_OZONE_COLOR_THEME_SOLARIZED_DARK, "Solarisé sombre" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_OZONE_COLOR_THEME_SOLARIZED_LIGHT, + "Solarisé clair" + ) + MSG_HASH( MENU_ENUM_LABEL_VALUE_LEFT_THUMBNAILS_OZONE, "Miniature secondaire" diff --git a/intl/msg_hash_it.h b/intl/msg_hash_it.h index 32c5ff3161..45354a7803 100644 --- a/intl/msg_hash_it.h +++ b/intl/msg_hash_it.h @@ -8469,6 +8469,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_OZONE_COLOR_THEME_SOLARIZED_DARK, "Scuro Solarizzato" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_OZONE_COLOR_THEME_SOLARIZED_LIGHT, + "Chiaro Solarizzato" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_LEFT_THUMBNAILS_OZONE, "Seconda Copertina" diff --git a/intl/msg_hash_ko.h b/intl/msg_hash_ko.h index afe8681a63..4584ed6158 100644 --- a/intl/msg_hash_ko.h +++ b/intl/msg_hash_ko.h @@ -8613,6 +8613,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_OZONE_COLOR_THEME_SOLARIZED_DARK, "솔라라이즈 다크" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_OZONE_COLOR_THEME_SOLARIZED_LIGHT, + "솔라라이즈 라이트" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_LEFT_THUMBNAILS_OZONE, "두 번째 미리보기" diff --git a/intl/msg_hash_pl.h b/intl/msg_hash_pl.h index 8918cedcec..69cbc53cee 100644 --- a/intl/msg_hash_pl.h +++ b/intl/msg_hash_pl.h @@ -8485,6 +8485,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_OZONE_COLOR_THEME_SOLARIZED_DARK, "Solarized ciemny" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_OZONE_COLOR_THEME_SOLARIZED_LIGHT, + "Solarized jasny" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_LEFT_THUMBNAILS_OZONE, "Druga miniatura" diff --git a/intl/msg_hash_pt_br.h b/intl/msg_hash_pt_br.h index 0441277343..d89c21fc33 100644 --- a/intl/msg_hash_pt_br.h +++ b/intl/msg_hash_pt_br.h @@ -8493,6 +8493,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_OZONE_COLOR_THEME_SOLARIZED_DARK, "Escuro solarizado" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_OZONE_COLOR_THEME_SOLARIZED_LIGHT, + "Solarizado (claro)" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_LEFT_THUMBNAILS_OZONE, "Segunda miniatura" diff --git a/intl/msg_hash_ru.h b/intl/msg_hash_ru.h index 35e4daa8c7..c2d3520f6f 100644 --- a/intl/msg_hash_ru.h +++ b/intl/msg_hash_ru.h @@ -8625,6 +8625,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_OZONE_COLOR_THEME_SOLARIZED_DARK, "Solarized тёмная" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_OZONE_COLOR_THEME_SOLARIZED_LIGHT, + "Solarized светлая" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_LEFT_THUMBNAILS_OZONE, "Дополнительный эскиз" diff --git a/intl/msg_hash_tr.h b/intl/msg_hash_tr.h index 4d7b6459e8..304744aa6c 100644 --- a/intl/msg_hash_tr.h +++ b/intl/msg_hash_tr.h @@ -8621,6 +8621,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_OZONE_COLOR_THEME_SOLARIZED_DARK, "Solarize Koyu" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_OZONE_COLOR_THEME_SOLARIZED_LIGHT, + "Solarize Açık" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_LEFT_THUMBNAILS_OZONE, "İkinci Küçük Resim" diff --git a/intl/msg_hash_uk.h b/intl/msg_hash_uk.h index dd992581de..68836e49d6 100644 --- a/intl/msg_hash_uk.h +++ b/intl/msg_hash_uk.h @@ -5133,6 +5133,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_OZONE_COLOR_THEME_SOLARIZED_DARK, "Салорайзед темна" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_OZONE_COLOR_THEME_SOLARIZED_LIGHT, + "Салорайзед світла" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_LEFT_THUMBNAILS_OZONE, "Додаткова мініатюра" diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h index b582ec0dbd..48bb0c2948 100644 --- a/intl/msg_hash_us.h +++ b/intl/msg_hash_us.h @@ -9225,6 +9225,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_OZONE_COLOR_THEME_SOLARIZED_DARK, "Solarized Dark" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_OZONE_COLOR_THEME_SOLARIZED_LIGHT, + "Solarized Light" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_LEFT_THUMBNAILS_OZONE, "Second Thumbnail" diff --git a/menu/drivers/ozone.c b/menu/drivers/ozone.c index 0a5ee6cb65..c2a738c2b7 100644 --- a/menu/drivers/ozone.c +++ b/menu/drivers/ozone.c @@ -962,6 +962,31 @@ static float ozone_sidebar_gradient_bottom_solarized_dark[16] = { 0.0000000, 0.1294118, 0.1725490, 1.0f, }; +static float ozone_background_libretro_running_solarized_light[16] = { + 1.0000000, 1.0000000, 0.9294118, 0.85f, + 1.0000000, 1.0000000, 0.9294118, 0.85f, + 1.0000000, 1.0000000, 0.9294118, 1.0f, + 1.0000000, 1.0000000, 0.9294118, 1.0f, +}; +static float ozone_sidebar_background_solarized_light[16] = { + 1.0000000, 1.0000000, 0.9294118, 1.0f, + 1.0000000, 1.0000000, 0.9294118, 1.0f, + 1.0000000, 1.0000000, 0.9294118, 1.0f, + 1.0000000, 1.0000000, 0.9294118, 1.0f, +}; + +static float ozone_sidebar_gradient_top_solarized_light[16] = { + 1.0000000, 1.0000000, 0.9294118, 1.0f, + 1.0000000, 1.0000000, 0.9294118, 1.0f, + 1.0000000, 1.0000000, 0.9294118, 1.0f, + 1.0000000, 1.0000000, 0.9294118, 1.0f, +}; +static float ozone_sidebar_gradient_bottom_solarized_light[16] = { + 1.0000000, 1.0000000, 0.9294118, 1.0f, + 1.0000000, 1.0000000, 0.9294118, 1.0f, + 1.0000000, 1.0000000, 0.9294118, 1.0f, + 1.0000000, 1.0000000, 0.9294118, 1.0f, +}; static float ozone_border_0_light[16] = COLOR_HEX_TO_FLOAT(0x50EFD9, 1.00); static float ozone_border_1_light[16] = COLOR_HEX_TO_FLOAT(0x0DB6D5, 1.00); @@ -989,6 +1014,9 @@ static float ozone_border_1_dracula[16] = COLOR_HEX_TO_FLOAT(0x9B61CC, 1.0f); static float ozone_border_0_solarized_dark[16] = COLOR_HEX_TO_FLOAT(0x67ECE2, 1.0f); static float ozone_border_1_solarized_dark[16] = COLOR_HEX_TO_FLOAT(0x2AA198, 1.0f); +static float ozone_border_0_solarized_light[16] = COLOR_HEX_TO_FLOAT(0x8F120F, 1.0f); +static float ozone_border_1_solarized_light[16] = COLOR_HEX_TO_FLOAT(0xDC322F, 1.0f); + ozone_theme_t ozone_theme_light = { COLOR_HEX_TO_FLOAT(0xEBEBEB, 1.00), /* background */ ozone_background_libretro_running_light, /* background_libretro_running */ @@ -1310,7 +1338,43 @@ ozone_theme_t ozone_theme_solarized_dark = { {0}, /* textures */ "solarized_dark" /* name */ +}; +ozone_theme_t ozone_theme_solarized_light = { + /* Background color */ + COLOR_HEX_TO_FLOAT(0xFDF6E3, 1.0f), /* background */ + ozone_background_libretro_running_solarized_light, /* background_libretro_running */ + + /* Float colors for quads and icons */ + COLOR_HEX_TO_FLOAT(0x657B83, 1.0f), /* header_footer_separator */ + COLOR_HEX_TO_FLOAT(0x586E75, 1.0f), /* text */ + COLOR_HEX_TO_FLOAT(0xEEE8D5, 1.0f), /* selection */ + COLOR_HEX_TO_FLOAT(0xDC322F, 1.0f), /* selection_border */ + COLOR_HEX_TO_FLOAT(0xEEE8D5, 1.0f), /* entries_border */ + COLOR_HEX_TO_FLOAT(0xCB4B16, 1.0f), /* entries_icon */ + COLOR_HEX_TO_FLOAT(0x586E75, 1.0f), /* text_selected */ + COLOR_HEX_TO_FLOAT(0xFDF6E3, 1.0f), /* message_background */ + + /* RGBA colors for text */ + 0x586E75FF, /* text_rgba */ + 0xDC322FFF, /* text_selected_rgba */ + 0x839496FF, /* text_sublabel_rgba */ + + /* Screensaver 'tint' (RGB24) */ + 0xEEE8D5, /* screensaver_tint */ + + /* Sidebar color */ + ozone_sidebar_background_solarized_light, /* sidebar_background */ + ozone_sidebar_gradient_top_solarized_light, /* sidebar_top_gradient */ + ozone_sidebar_gradient_bottom_solarized_light, /* sidebar_bottom_gradient */ + + /* Fancy cursor colors */ + ozone_border_0_solarized_light, /* cursor_border_0 */ + ozone_border_1_solarized_light, /* cursor_border_1 */ + + {0}, /* textures */ + + "solarized_light" /* name */ }; ozone_theme_t *ozone_themes[] = { @@ -1322,7 +1386,8 @@ ozone_theme_t *ozone_themes[] = { &ozone_theme_hacking_the_kernel, &ozone_theme_twilight_zone, &ozone_theme_dracula, - &ozone_theme_solarized_dark + &ozone_theme_solarized_dark, + &ozone_theme_solarized_light }; @@ -1452,6 +1517,9 @@ static void ozone_set_color_theme(ozone_handle_t *ozone, unsigned color_theme) case OZONE_COLOR_THEME_SOLARIZED_DARK: theme = &ozone_theme_solarized_dark; break; + case OZONE_COLOR_THEME_SOLARIZED_LIGHT: + theme = &ozone_theme_solarized_light; + break; default: break; } diff --git a/menu/menu_defines.h b/menu/menu_defines.h index 58c09e0179..59cee2dce8 100644 --- a/menu/menu_defines.h +++ b/menu/menu_defines.h @@ -366,6 +366,7 @@ enum ozone_color_theme OZONE_COLOR_THEME_TWILIGHT_ZONE, OZONE_COLOR_THEME_DRACULA, OZONE_COLOR_THEME_SOLARIZED_DARK, + OZONE_COLOR_THEME_SOLARIZED_LIGHT, OZONE_COLOR_THEME_LAST }; diff --git a/menu/menu_setting.c b/menu/menu_setting.c index a0d9667bfb..434c3b87d2 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -4758,6 +4758,11 @@ static void setting_get_string_representation_uint_ozone_menu_color_theme( msg_hash_to_str( MENU_ENUM_LABEL_VALUE_OZONE_COLOR_THEME_SOLARIZED_DARK), len); break; + case OZONE_COLOR_THEME_SOLARIZED_LIGHT: + strlcpy(s, + msg_hash_to_str( + MENU_ENUM_LABEL_VALUE_OZONE_COLOR_THEME_SOLARIZED_LIGHT), len); + break; case OZONE_COLOR_THEME_BASIC_WHITE: default: strlcpy(s, diff --git a/msg_hash.h b/msg_hash.h index 8be47d9b05..89e1acea3a 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -603,6 +603,7 @@ enum msg_hash_enums MENU_ENUM_LABEL_VALUE_OZONE_COLOR_THEME_TWILIGHT_ZONE, MENU_ENUM_LABEL_VALUE_OZONE_COLOR_THEME_DRACULA, MENU_ENUM_LABEL_VALUE_OZONE_COLOR_THEME_SOLARIZED_DARK, + MENU_ENUM_LABEL_VALUE_OZONE_COLOR_THEME_SOLARIZED_LIGHT, MENU_ENUM_LABEL_VALUE_XMB_ICON_THEME_MONOCHROME, MENU_ENUM_LABEL_VALUE_XMB_ICON_THEME_MONOCHROME_INVERTED,