Skip to content

Commit

Permalink
theme adjustments to fix custom themes
Browse files Browse the repository at this point in the history
  • Loading branch information
Tupakaveli authored and KrahJohlito committed May 19, 2020
1 parent 50a93d3 commit d0ac3ed
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
12 changes: 7 additions & 5 deletions misc/conf_theme_OPL.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ main1:
type=ItemsList
x=42
y=42
width=350
width=400
height=306
main2:
type=MenuIcon
Expand All @@ -22,7 +22,7 @@ main3:
main4:
type=ItemCover
default=cover
x=-122
x=-102
y=-295
overlay=case
overlay_ulx=49
Expand All @@ -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
Expand Down Expand Up @@ -157,4 +158,5 @@ info16:
height=148
info17:
type=InfoHintText
aligned=1
aligned=1
x=POS_MID
6 changes: 3 additions & 3 deletions src/themes.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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)
Expand Down

0 comments on commit d0ac3ed

Please sign in to comment.