mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 08:21:07 +02:00
neutrino hintbox: optimize of icon arrangment in title bar
Note: a lot of popup messages are questions,
but e.g a question icon is still missing and probaly some others
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1438 e54a6e83-5905-42d5-8d5c-058d10e6a962
Origin commit data
------------------
Branch: ni/coolstream
Commit: dc50d8ea01
Author: Thilo Graf <dbt@novatux.de>
Date: 2011-05-06 (Fri, 06 May 2011)
Origin message was:
------------------
*neutrino hintbox: optimize of icon arrangment in title bar
Note: a lot of popup messages are questions,
but e.g a question icon is still missing and probaly some others
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1438 e54a6e83-5905-42d5-8d5c-058d10e6a962
------------------
This commit was generated by Migit
This commit is contained in:
@@ -39,6 +39,7 @@
|
||||
#include <global.h>
|
||||
#include <neutrino.h>
|
||||
#include <driver/screen_max.h>
|
||||
#include <driver/framebuffer.h>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
@@ -216,18 +217,30 @@ void CHintBoxExt::refresh(bool toround)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// bottom, right shadow
|
||||
m_window->paintBoxRel(SHADOW_OFFSET, SHADOW_OFFSET, m_width, m_height, COL_INFOBAR_SHADOW_PLUS_0, RADIUS_LARGE, toround ? CORNER_ALL : CORNER_BOTTOM | CORNER_TOP_RIGHT);
|
||||
// title
|
||||
|
||||
// title bar
|
||||
m_window->paintBoxRel(0, 0, m_width, m_theight, (CFBWindow::color_t)COL_MENUHEAD_PLUS_0, RADIUS_LARGE, CORNER_TOP);//round
|
||||
|
||||
|
||||
// icon
|
||||
int x_offset = 6, icon_space = x_offset, x_text;
|
||||
std::string title_text = g_Locale->getText(m_caption);
|
||||
if (!m_iconfile.empty())
|
||||
{
|
||||
m_window->paintIcon(m_iconfile.c_str(), 8, 5);
|
||||
m_window->RenderString(g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE], 40, m_theight, m_width - 40, g_Locale->getText(m_caption), (CFBWindow::color_t)COL_MENUHEAD, 0, true); // UTF-8
|
||||
int w, h;
|
||||
CFrameBuffer::getInstance()->getIconSize(m_iconfile.c_str(), &w, &h);
|
||||
icon_space = w + 2*x_offset;
|
||||
int y_icon = 0+ (m_theight >> 1) - (h >> 1);
|
||||
m_window->paintIcon(m_iconfile.c_str(), x_offset, y_icon);
|
||||
x_text = icon_space;
|
||||
}
|
||||
else
|
||||
m_window->RenderString(g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE], 10, m_theight, m_width - 10, g_Locale->getText(m_caption), (CFBWindow::color_t)COL_MENUHEAD, 0, true); // UTF-8
|
||||
x_text = x_offset;
|
||||
|
||||
// title text
|
||||
m_window->RenderString(g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE], x_text, m_theight, m_width, title_text.c_str(), (CFBWindow::color_t)COL_MENUHEAD, 0, true); // UTF-8
|
||||
|
||||
// background of text panel
|
||||
m_window->paintBoxRel(0, m_theight, m_width, (m_maxEntriesPerPage + 1) * m_fheight, (CFBWindow::color_t)COL_MENUCONTENT_PLUS_0, toround ? RADIUS_LARGE : 0, CORNER_BOTTOM);//round
|
||||
|
Reference in New Issue
Block a user