From d0ac3ed9bc9cddefba1d3d0211c2ae81d908c5b3 Mon Sep 17 00:00:00 2001 From: Tupakaveli Date: Sat, 25 Apr 2020 17:44:00 +0930 Subject: [PATCH] theme adjustments to fix custom themes --- misc/conf_theme_OPL.cfg | 12 +++++++----- src/themes.c | 6 +++--- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/misc/conf_theme_OPL.cfg b/misc/conf_theme_OPL.cfg index 1ea98e8d7..978e2c0f6 100755 --- a/misc/conf_theme_OPL.cfg +++ b/misc/conf_theme_OPL.cfg @@ -9,7 +9,7 @@ main1: type=ItemsList x=42 y=42 - width=350 + width=400 height=306 main2: type=MenuIcon @@ -22,7 +22,7 @@ main3: main4: type=ItemCover default=cover - x=-122 + x=-102 y=-295 overlay=case overlay_ulx=49 @@ -36,15 +36,16 @@ main4: main5: type=ItemIcon default=disc - x=-185 + x=-165 y=-207 main6: type=ItemText - x=-129 + x=-109 y=-145 main7: type=HintText aligned=1 + x=POS_MID main8: type=LoadingIcon y=-80 @@ -157,4 +158,5 @@ info16: height=148 info17: type=InfoHintText - aligned=1 \ No newline at end of file + aligned=1 + x=POS_MID \ No newline at end of file diff --git a/src/themes.c b/src/themes.c index 18bfc7c2a..3abfe1f5b 100644 --- a/src/themes.c +++ b/src/themes.c @@ -954,7 +954,7 @@ static int addGUIElem(const char *themePath, config_set_t *themeConfig, theme_t elem = initBasic(themePath, themeConfig, theme, name, ELEM_TYPE_MENU_ICON, screenWidth >> 1, 400, ALIGN_CENTER, DIM_UNDEF, DIM_UNDEF, SCALING_RATIO, gDefaultCol, theme->fonts[0]); elem->drawElem = &drawMenuIcon; } else if (!strcmp(elementsType[ELEM_TYPE_MENU_TEXT], type)) { - elem = initBasic(themePath, themeConfig, theme, name, ELEM_TYPE_MENU_TEXT, 0, 0, ALIGN_CENTER, DIM_UNDEF, DIM_UNDEF, SCALING_RATIO, theme->textColor, theme->fonts[0]); + elem = initBasic(themePath, themeConfig, theme, name, ELEM_TYPE_MENU_TEXT, screenWidth >> 1, 20, ALIGN_CENTER, 200, 20, SCALING_RATIO, theme->textColor, theme->fonts[0]); elem->drawElem = &drawMenuText; } else if (!strcmp(elementsType[ELEM_TYPE_ITEMS_LIST], type)) { if (!theme->itemsList) { @@ -972,10 +972,10 @@ static int addGUIElem(const char *themePath, config_set_t *themeConfig, theme_t elem = initBasic(themePath, themeConfig, theme, name, ELEM_TYPE_ITEM_TEXT, 0, 0, ALIGN_CENTER, DIM_UNDEF, DIM_UNDEF, SCALING_RATIO, theme->textColor, theme->fonts[0]); elem->drawElem = &drawItemText; } else if (!strcmp(elementsType[ELEM_TYPE_HINT_TEXT], type)) { - elem = initBasic(themePath, themeConfig, theme, name, ELEM_TYPE_HINT_TEXT, screenWidth >> 1, -HINT_HEIGHT, ALIGN_NONE, 12, 20, SCALING_RATIO, theme->textColor, theme->fonts[0]); + elem = initBasic(themePath, themeConfig, theme, name, ELEM_TYPE_HINT_TEXT, 16, -HINT_HEIGHT, ALIGN_NONE, 12, 20, SCALING_RATIO, theme->textColor, theme->fonts[0]); elem->drawElem = &drawHintText; } else if (!strcmp(elementsType[ELEM_TYPE_INFO_HINT_TEXT], type)) { - elem = initBasic(themePath, themeConfig, theme, name, ELEM_TYPE_INFO_HINT_TEXT, screenWidth >> 1, -HINT_HEIGHT, ALIGN_NONE, 12, 20, SCALING_RATIO, theme->textColor, theme->fonts[0]); + elem = initBasic(themePath, themeConfig, theme, name, ELEM_TYPE_INFO_HINT_TEXT, 16, -HINT_HEIGHT, ALIGN_NONE, 12, 20, SCALING_RATIO, theme->textColor, theme->fonts[0]); elem->drawElem = &drawInfoHintText; } else if (!strcmp(elementsType[ELEM_TYPE_LOADING_ICON], type)) { if (!theme->loadingIcon)