diff --git a/src/gui/upnpbrowser.cpp b/src/gui/upnpbrowser.cpp index be3f60adf..b5c70a993 100644 --- a/src/gui/upnpbrowser.cpp +++ b/src/gui/upnpbrowser.cpp @@ -73,6 +73,8 @@ CUpnpBrowserGui::CUpnpBrowserGui() Init(); + font_item = SNeutrinoSettings::FONT_TYPE_MENU; + dline = NULL; image = NULL; @@ -108,7 +110,7 @@ void CUpnpBrowserGui::Init() m_theight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight(); m_buttonHeight = m_theight; m_mheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight(); - m_fheight = g_Font[SNeutrinoSettings::FONT_TYPE_FILEBROWSER_ITEM]->getHeight(); + m_fheight = g_Font[font_item]->getHeight(); m_title_height = m_iheight*3 + 20; // 3 lines + offset m_info_height = m_mheight*2; m_listmaxshow = (m_height - m_info_height - m_title_height - m_theight - 2*m_buttonHeight) / (m_fheight); @@ -935,10 +937,10 @@ void CUpnpBrowserGui::paintDevice(unsigned int _pos) std::string name = m_devices[pos].friendlyname; - int w = g_Font[SNeutrinoSettings::FONT_TYPE_FILEBROWSER_ITEM]->getRenderWidth(name) + 5; - g_Font[SNeutrinoSettings::FONT_TYPE_FILEBROWSER_ITEM]->RenderString(m_x + 10, ypos + m_fheight, m_width - 30 - w, + int w = g_Font[font_item]->getRenderWidth(name) + 5; + g_Font[font_item]->RenderString(m_x + 10, ypos + m_fheight, m_width - 30 - w, num, color, m_fheight); - g_Font[SNeutrinoSettings::FONT_TYPE_FILEBROWSER_ITEM]->RenderString(m_x + m_width - 15 - w, ypos + m_fheight, + g_Font[font_item]->RenderString(m_x + m_width - 15 - w, ypos + m_fheight, w, name, color, m_fheight); } @@ -1036,7 +1038,7 @@ void CUpnpBrowserGui::paintItem(std::vector *entries, unsigned int po std::string name = entry->title; char tmp_time[] = "00:00:00.0"; - int w = g_Font[SNeutrinoSettings::FONT_TYPE_FILEBROWSER_ITEM]->getRenderWidth(tmp_time); + int w = g_Font[font_item]->getRenderWidth(tmp_time); int icon_w = 0; int icon_h = 0; @@ -1047,8 +1049,8 @@ void CUpnpBrowserGui::paintItem(std::vector *entries, unsigned int po icon_o = icon_w + 10; m_frameBuffer->paintIcon(fileicon, m_x + 10, ypos + (m_fheight - icon_h) / 2); } - g_Font[SNeutrinoSettings::FONT_TYPE_FILEBROWSER_ITEM]->RenderString(m_x + m_width - 15 - 10 - w, ypos + m_fheight, w, info, color, m_fheight); - g_Font[SNeutrinoSettings::FONT_TYPE_FILEBROWSER_ITEM]->RenderString(m_x + 10 + icon_o, ypos + m_fheight, m_width - icon_o - 15 - 2*10 - w, name, color, m_fheight); + g_Font[font_item]->RenderString(m_x + m_width - 15 - 10 - w, ypos + m_fheight, w, info, color, m_fheight); + g_Font[font_item]->RenderString(m_x + 10 + icon_o, ypos + m_fheight, m_width - icon_o - 15 - 2*10 - w, name, color, m_fheight); } void CUpnpBrowserGui::paintItemInfo(UPnPEntry *entry) diff --git a/src/gui/upnpbrowser.h b/src/gui/upnpbrowser.h index c5ef41605..cb30bf08c 100644 --- a/src/gui/upnpbrowser.h +++ b/src/gui/upnpbrowser.h @@ -83,6 +83,7 @@ class CUpnpBrowserGui : public CMenuTarget, public CListHelpers int m_theight; // title font height int m_mheight; // lower box font height int m_iheight; // upper box font height + int font_item; int m_buttonHeight; int m_title_height; int m_info_height;