diff --git a/src/global.h b/src/global.h index 09c199489..30b9fa73e 100644 --- a/src/global.h +++ b/src/global.h @@ -87,7 +87,7 @@ NEUTRINO_CPP CTimerdClient *g_Timerd; NEUTRINO_CPP FBFontRenderClass *g_fontRenderer; -NEUTRINO_CPP Font * g_Font[FONT_TYPE_COUNT]; +NEUTRINO_CPP Font * g_Font[SNeutrinoSettings::FONT_TYPE_COUNT]; NEUTRINO_CPP Font * g_SignalFont; NEUTRINO_CPP CRCInput *g_RCInput; diff --git a/src/gui/luainstance.cpp b/src/gui/luainstance.cpp index 9aa4153a8..d893ad4dd 100644 --- a/src/gui/luainstance.cpp +++ b/src/gui/luainstance.cpp @@ -456,7 +456,7 @@ int CLuaInstance::RenderString(lua_State *L) boxh = luaL_checkint(L, 8); if (numargs > 8) center = luaL_checkint(L, 9); - if (f >= FONT_TYPE_COUNT || f < 0) + if (f >= SNeutrinoSettings::FONT_TYPE_COUNT || f < 0) f = SNeutrinoSettings::FONT_TYPE_MENU; int rwidth = g_Font[f]->getRenderWidth(text, true); if (center) { /* center the text inside the box */ @@ -504,7 +504,7 @@ int CLuaInstance::FontHeight(lua_State *L) if (!W) return 0; f = luaL_checkint(L, 2); /* font number, use FONT['xxx'] for FONT_TYPE_xxx in the script */ - if (f >= FONT_TYPE_COUNT || f < 0) + if (f >= SNeutrinoSettings::FONT_TYPE_COUNT || f < 0) f = SNeutrinoSettings::FONT_TYPE_MENU; lua_pushinteger(L, (int)g_Font[f]->getHeight()); return 1; diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index 2aa16d8d0..fe117c6db 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -146,7 +146,7 @@ font_sizes_groups font_sizes_groups[6] = #define FONT_STYLE_BOLD 1 #define FONT_STYLE_ITALIC 2 -font_sizes_struct neutrino_font[FONT_TYPE_COUNT] = +font_sizes_struct neutrino_font[SNeutrinoSettings::FONT_TYPE_COUNT] = { {LOCALE_FONTSIZE_MENU , 20, FONT_STYLE_BOLD , 0}, {LOCALE_FONTSIZE_MENU_TITLE , 30, FONT_STYLE_BOLD , 0}, diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 9f10088b2..d3c9b2bda 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -1611,7 +1611,7 @@ void CNeutrinoApp::SetupFonts() g_fontRenderer->AddFont(font.filename, true); // make italics style[2] = "Italic"; - for (int i = 0; i < FONT_TYPE_COUNT; i++) + for (int i = 0; i < SNeutrinoSettings::FONT_TYPE_COUNT; i++) { if(g_Font[i]) delete g_Font[i]; g_Font[i] = g_fontRenderer->getFont(font.name, style[neutrino_font[i].style], configfile.getInt32(locale_real_names[neutrino_font[i].name], neutrino_font[i].defaultsize) + neutrino_font[i].size_offset * font.size_offset); @@ -4058,7 +4058,7 @@ void CNeutrinoApp::Cleanup() delete RADIOsatList; RADIOsatList = NULL; printf("cleanup 1\n");fflush(stdout); - for (int i = 0; i < FONT_TYPE_COUNT; i++) { + for (int i = 0; i < SNeutrinoSettings::FONT_TYPE_COUNT; i++) { delete g_Font[i]; g_Font[i] = NULL; } diff --git a/src/system/settings.h b/src/system/settings.h index 2150546cb..c8aace42d 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -473,33 +473,33 @@ struct SNeutrinoSettings // Font sizes -#define FONT_TYPE_COUNT 25 enum FONT_TYPES { - FONT_TYPE_MENU = 0, - FONT_TYPE_MENU_TITLE = 1, - FONT_TYPE_MENU_INFO = 2, - FONT_TYPE_EPG_TITLE = 3, - FONT_TYPE_EPG_INFO1 = 4, - FONT_TYPE_EPG_INFO2 = 5, - FONT_TYPE_EPG_DATE = 6, - FONT_TYPE_EVENTLIST_TITLE = 7, - FONT_TYPE_EVENTLIST_ITEMLARGE = 8, - FONT_TYPE_EVENTLIST_ITEMSMALL = 9, - FONT_TYPE_EVENTLIST_DATETIME = 10, - FONT_TYPE_EVENTLIST_EVENT = 11, - FONT_TYPE_GAMELIST_ITEMLARGE = 12, - FONT_TYPE_GAMELIST_ITEMSMALL = 13, - FONT_TYPE_CHANNELLIST = 14, - FONT_TYPE_CHANNELLIST_DESCR = 15, - FONT_TYPE_CHANNELLIST_NUMBER = 16, - FONT_TYPE_CHANNELLIST_EVENT = 17, - FONT_TYPE_CHANNEL_NUM_ZAP = 18, - FONT_TYPE_INFOBAR_NUMBER = 19, - FONT_TYPE_INFOBAR_CHANNAME = 20, - FONT_TYPE_INFOBAR_INFO = 21, - FONT_TYPE_INFOBAR_SMALL = 22, - FONT_TYPE_FILEBROWSER_ITEM = 23, - FONT_TYPE_MENU_HINT = 24 + FONT_TYPE_MENU = 0, + FONT_TYPE_MENU_TITLE, + FONT_TYPE_MENU_INFO, + FONT_TYPE_EPG_TITLE, + FONT_TYPE_EPG_INFO1, + FONT_TYPE_EPG_INFO2, + FONT_TYPE_EPG_DATE, + FONT_TYPE_EVENTLIST_TITLE, + FONT_TYPE_EVENTLIST_ITEMLARGE, + FONT_TYPE_EVENTLIST_ITEMSMALL, + FONT_TYPE_EVENTLIST_DATETIME, + FONT_TYPE_EVENTLIST_EVENT, + FONT_TYPE_GAMELIST_ITEMLARGE, + FONT_TYPE_GAMELIST_ITEMSMALL, + FONT_TYPE_CHANNELLIST, + FONT_TYPE_CHANNELLIST_DESCR, + FONT_TYPE_CHANNELLIST_NUMBER, + FONT_TYPE_CHANNELLIST_EVENT, + FONT_TYPE_CHANNEL_NUM_ZAP, + FONT_TYPE_INFOBAR_NUMBER, + FONT_TYPE_INFOBAR_CHANNAME, + FONT_TYPE_INFOBAR_INFO, + FONT_TYPE_INFOBAR_SMALL, + FONT_TYPE_FILEBROWSER_ITEM, + FONT_TYPE_MENU_HINT, + FONT_TYPE_COUNT }; // lcdd