mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
- upnpbrowser: use larger font for items; we have space, so let's use it
This commit is contained in:
@@ -73,6 +73,8 @@ CUpnpBrowserGui::CUpnpBrowserGui()
|
|||||||
|
|
||||||
Init();
|
Init();
|
||||||
|
|
||||||
|
font_item = SNeutrinoSettings::FONT_TYPE_MENU;
|
||||||
|
|
||||||
dline = NULL;
|
dline = NULL;
|
||||||
image = NULL;
|
image = NULL;
|
||||||
|
|
||||||
@@ -108,7 +110,7 @@ void CUpnpBrowserGui::Init()
|
|||||||
m_theight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight();
|
m_theight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight();
|
||||||
m_buttonHeight = m_theight;
|
m_buttonHeight = m_theight;
|
||||||
m_mheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
|
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_title_height = m_iheight*3 + 20; // 3 lines + offset
|
||||||
m_info_height = m_mheight*2;
|
m_info_height = m_mheight*2;
|
||||||
m_listmaxshow = (m_height - m_info_height - m_title_height - m_theight - 2*m_buttonHeight) / (m_fheight);
|
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;
|
std::string name = m_devices[pos].friendlyname;
|
||||||
|
|
||||||
int w = g_Font[SNeutrinoSettings::FONT_TYPE_FILEBROWSER_ITEM]->getRenderWidth(name) + 5;
|
int w = g_Font[font_item]->getRenderWidth(name) + 5;
|
||||||
g_Font[SNeutrinoSettings::FONT_TYPE_FILEBROWSER_ITEM]->RenderString(m_x + 10, ypos + m_fheight, m_width - 30 - w,
|
g_Font[font_item]->RenderString(m_x + 10, ypos + m_fheight, m_width - 30 - w,
|
||||||
num, color, m_fheight);
|
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);
|
w, name, color, m_fheight);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1036,7 +1038,7 @@ void CUpnpBrowserGui::paintItem(std::vector<UPnPEntry> *entries, unsigned int po
|
|||||||
|
|
||||||
std::string name = entry->title;
|
std::string name = entry->title;
|
||||||
char tmp_time[] = "00:00:00.0";
|
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_w = 0;
|
||||||
int icon_h = 0;
|
int icon_h = 0;
|
||||||
@@ -1047,8 +1049,8 @@ void CUpnpBrowserGui::paintItem(std::vector<UPnPEntry> *entries, unsigned int po
|
|||||||
icon_o = icon_w + 10;
|
icon_o = icon_w + 10;
|
||||||
m_frameBuffer->paintIcon(fileicon, m_x + 10, ypos + (m_fheight - icon_h) / 2);
|
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[font_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 + 10 + icon_o, ypos + m_fheight, m_width - icon_o - 15 - 2*10 - w, name, color, m_fheight);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CUpnpBrowserGui::paintItemInfo(UPnPEntry *entry)
|
void CUpnpBrowserGui::paintItemInfo(UPnPEntry *entry)
|
||||||
|
@@ -83,6 +83,7 @@ class CUpnpBrowserGui : public CMenuTarget, public CListHelpers
|
|||||||
int m_theight; // title font height
|
int m_theight; // title font height
|
||||||
int m_mheight; // lower box font height
|
int m_mheight; // lower box font height
|
||||||
int m_iheight; // upper box font height
|
int m_iheight; // upper box font height
|
||||||
|
int font_item;
|
||||||
int m_buttonHeight;
|
int m_buttonHeight;
|
||||||
int m_title_height;
|
int m_title_height;
|
||||||
int m_info_height;
|
int m_info_height;
|
||||||
|
Reference in New Issue
Block a user