Thread: [Commits] : Tuxbox-GIT: apps branch master updated. CVS-Final-62-g4131910
Tuxbox Sources
Brought to you by:
dbt1
|
From: Thilo G. <tux...@ne...> - 2013-03-20 07:00:25
|
Project "Tuxbox-GIT: apps":
The branch, master has been updated
via 4131910966d8e6bd33ba92b7d7db179ba2e088b9 (commit)
via ed450e164dec029152a19cf00ddddbce10faf54c (commit)
via 76dbda03bf959bb9a83b624eb96de70a78a82478 (commit)
via bb0961cbcceb6411f9d10fed92fccfa753e0159a (commit)
via 8844a62fab2a41f16cde5f92f722b0a8dca42515 (commit)
via dd4e304799b7b818ebd1b583e0448f6d057b4e4f (commit)
via d111c4e6c462f3032d8137fa42bdb37c44572fe6 (commit)
via 06223d8149981c055c407bda93fd13fceb08eca6 (commit)
via d6d6813aa578d4a918c633b4e46a6e9c9c303948 (commit)
via 346b925b26e17f501b2552dbe3e19a13c09dc9d6 (commit)
via 21e23bf1da812e6f1aa08d8c222414f17d3038e7 (commit)
from a0de98af3b9ad40ee7d015e5fce203feb84d5f10 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 4131910966d8e6bd33ba92b7d7db179ba2e088b9
Author: Christian Schuett <Gau...@ho...>
Date: Tue Mar 19 21:04:30 2013 +0100
Neutrino: fix calculating max button width in button bar
prevent button text from overflowing the button bar
Signed-off-by: Christian Schuett <Gau...@ho...>
diff --git a/tuxbox/neutrino/data/locale/deutsch.locale b/tuxbox/neutrino/data/locale/deutsch.locale
index e18d2f7..fd9d341 100644
--- a/tuxbox/neutrino/data/locale/deutsch.locale
+++ b/tuxbox/neutrino/data/locale/deutsch.locale
@@ -424,6 +424,7 @@ eventfinder.start_search Starte Suche
eventlistbar.channelswitch Umschalten
eventlistbar.eventsort Sortieren
eventlistbar.recordevent Aufnehmen
+eventlistbar.reload Aktualisieren
experimentalsettings Experimentelle Einstellungen
experimentalsettings.head Experimentelle Einstellungen
favorites.addchannel Der aktuelle Kanal wird dem Bouquet \n"Meine Favoriten" hinzugefügt. \nDie Speicherung benötigt einen Moment...
@@ -936,6 +937,8 @@ movieplayer.goto.h2 +,- -> relativer Sprung
movieplayer.head Movieplayer
movieplayer.nostreamingserver Es konnte keine Verbindung\nzum Streamingserver hergestellt werden.
movieplayer.pleasewait Bitte warten Sie.\nDie Verbindung zum Streamingserver wird hergestellt.
+movieplayer.plugin Plugin
+movieplayer.resync Resync
movieplayer.toomanybookmarks Sie haben bereits zu viele Bookmarks angelegt.\nEs muà erst ein anderes gelöscht werden.
movieplayer.tshelp1 Stop
movieplayer.tshelp10 ca. 10 Minuten zurück
diff --git a/tuxbox/neutrino/data/locale/english.locale b/tuxbox/neutrino/data/locale/english.locale
index f14024e..894db50 100644
--- a/tuxbox/neutrino/data/locale/english.locale
+++ b/tuxbox/neutrino/data/locale/english.locale
@@ -424,6 +424,7 @@ eventfinder.start_search Start Search
eventlistbar.channelswitch schedule
eventlistbar.eventsort sorting
eventlistbar.recordevent record
+eventlistbar.reload reload
experimentalsettings Experimental Settings
experimentalsettings.head Experimental Settings
favorites.addchannel The current channel will be added \nto the bouquet "My Favorites".\nThis will take a few seconds...
@@ -936,6 +937,8 @@ movieplayer.goto.h2 +,- -> relative jump
movieplayer.head Movie Player
movieplayer.nostreamingserver The streaming server could not be reached.
movieplayer.pleasewait Please wait.\nConnecting to the streaming server...
+movieplayer.plugin Plugin
+movieplayer.resync Resync
movieplayer.toomanybookmarks There are too many bookmarks.\nYou need to delete one of them first.
movieplayer.tshelp1 Stop
movieplayer.tshelp10 approx. 10 minutes back
diff --git a/tuxbox/neutrino/src/gui/audioplayer.cpp b/tuxbox/neutrino/src/gui/audioplayer.cpp
index c349124..29f3d8e 100644
--- a/tuxbox/neutrino/src/gui/audioplayer.cpp
+++ b/tuxbox/neutrino/src/gui/audioplayer.cpp
@@ -1680,7 +1680,8 @@ void CAudioPlayerGui::paintFoot()
start_x = m_x + 10;
start_top = top + 2;
- int ButtonWidth = (m_width - 20) / 4;
+ int ButtonsMaxWidth = m_width - 20;
+ int ButtonWidth = ButtonsMaxWidth / 4;
int ButtonWidth2 = (m_width - 50) / 2;
m_frameBuffer->paintBoxRel(m_x, top, m_width, 2 * m_buttonHeight, COL_INFOBAR_SHADOW_PLUS_1, c_rad_mid, CORNER_BOTTOM);
m_frameBuffer->paintHLine(m_x, m_x + m_width, top, COL_INFOBAR_SHADOW_PLUS_1);
@@ -1694,29 +1695,29 @@ void CAudioPlayerGui::paintFoot()
if (m_playlist.empty()) {
if (m_inetmode)
::paintButtons(m_frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale,
- start_x, start_top, ButtonWidth, 2, AudioPlayerButtons[7]);
+ start_x, start_top, ButtonWidth, 2, AudioPlayerButtons[7], ButtonsMaxWidth);
else
::paintButtons(m_frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale,
- start_x, start_top, ButtonWidth, 1, &(AudioPlayerButtons[7][0]));
+ start_x, start_top, ButtonWidth, 1, &(AudioPlayerButtons[7][0]), ButtonsMaxWidth);
} else
if (m_inetmode)
::paintButtons(m_frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale,
- start_x, start_top, ButtonWidth, 4, AudioPlayerButtons[8]);
+ start_x, start_top, ButtonWidth, 4, AudioPlayerButtons[8], ButtonsMaxWidth);
else
::paintButtons(m_frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale,
- start_x, start_top, ButtonWidth, 4, AudioPlayerButtons[1]);
+ start_x, start_top, ButtonWidth, 4, AudioPlayerButtons[1], ButtonsMaxWidth);
}
else if (m_key_level == 1)
{
if (m_curr_audiofile.FileType != CFile::STREAM_AUDIO)
{
::paintButtons(m_frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale,
- start_x, start_top, ButtonWidth, 4, AudioPlayerButtons[0]);
+ start_x, start_top, ButtonWidth, 4, AudioPlayerButtons[0], ButtonsMaxWidth);
}
else
{
::paintButtons(m_frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale,
- start_x, start_top, ButtonWidth*2, 2, AudioPlayerButtons[6]);
+ start_x, start_top, ButtonWidth*2, 2, AudioPlayerButtons[6], ButtonsMaxWidth);
}
}
else
@@ -1726,12 +1727,12 @@ void CAudioPlayerGui::paintFoot()
if (m_select_title_by_name)
{
::paintButtons(m_frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale,
- start_x, start_top, ButtonWidth, 2, AudioPlayerButtons[5]);
+ start_x, start_top, ButtonWidth, 2, AudioPlayerButtons[5], ButtonsMaxWidth);
}
else
{
::paintButtons(m_frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale,
- start_x, start_top, ButtonWidth, 2, AudioPlayerButtons[4]);
+ start_x, start_top, ButtonWidth, 2, AudioPlayerButtons[4], ButtonsMaxWidth);
}
}
else
@@ -1739,12 +1740,12 @@ void CAudioPlayerGui::paintFoot()
if (m_select_title_by_name)
{
::paintButtons(m_frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale,
- start_x, start_top, ButtonWidth*2, 2, AudioPlayerButtons[3]);
+ start_x, start_top, ButtonWidth*2, 2, AudioPlayerButtons[3], ButtonsMaxWidth);
}
else
{
::paintButtons(m_frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale,
- start_x, start_top, ButtonWidth*2, 2, AudioPlayerButtons[2]);
+ start_x, start_top, ButtonWidth*2, 2, AudioPlayerButtons[2], ButtonsMaxWidth);
}
}
}
diff --git a/tuxbox/neutrino/src/gui/bedit/bouqueteditor_bouquets.cpp b/tuxbox/neutrino/src/gui/bedit/bouqueteditor_bouquets.cpp
index 1ec7a6e..92a05fc 100644
--- a/tuxbox/neutrino/src/gui/bedit/bouqueteditor_bouquets.cpp
+++ b/tuxbox/neutrino/src/gui/bedit/bouqueteditor_bouquets.cpp
@@ -159,7 +159,7 @@ void CBEBouquetWidget::paintFoot()
CBEBouquetWidgetButtons1[4].locale = LOCALE_BOUQUETEDITOR_LOCK;
break;
}
- ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + 5, y + height+2, (width-20)/5, 5, CBEBouquetWidgetButtons1, width-20);
+ ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + 5, y + height + 2, (width - 10) / 5, 5, CBEBouquetWidgetButtons1);
}
void CBEBouquetWidget::hide()
diff --git a/tuxbox/neutrino/src/gui/bedit/bouqueteditor_channels.cpp b/tuxbox/neutrino/src/gui/bedit/bouqueteditor_channels.cpp
index 3954a0b..654cbaf 100644
--- a/tuxbox/neutrino/src/gui/bedit/bouqueteditor_channels.cpp
+++ b/tuxbox/neutrino/src/gui/bedit/bouqueteditor_channels.cpp
@@ -142,7 +142,7 @@ const struct button_label CBEChannelWidgetButtons[4] =
void CBEChannelWidget::paintFoot()
{
frameBuffer->paintBoxRel(x,y+height, width,ButtonHeight, COL_INFOBAR_SHADOW_PLUS_1, RADIUS_MID, CORNER_BOTTOM);
- ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + 10, y + height, width/5, 4, CBEChannelWidgetButtons);
+ ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + 10, y + height, (width - 20) / 4, 4, CBEChannelWidgetButtons);
}
void CBEChannelWidget::hide()
diff --git a/tuxbox/neutrino/src/gui/bedit/bouqueteditor_chanselect.cpp b/tuxbox/neutrino/src/gui/bedit/bouqueteditor_chanselect.cpp
index d138b27..ac13741 100644
--- a/tuxbox/neutrino/src/gui/bedit/bouqueteditor_chanselect.cpp
+++ b/tuxbox/neutrino/src/gui/bedit/bouqueteditor_chanselect.cpp
@@ -171,5 +171,5 @@ void CBEChannelSelectWidget::paintFoot()
int y_foot = y + height;
frameBuffer->paintBoxRel(x, y_foot, width, ButtonHeight, COL_INFOBAR_SHADOW_PLUS_1, RADIUS_MID, CORNER_BOTTOM);
- ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + 5, y_foot, width/2, 2, CBEBouquetSelectWidgetButtons);
+ ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + 5, y_foot, (width - 10) / 2, 2, CBEBouquetSelectWidgetButtons);
}
diff --git a/tuxbox/neutrino/src/gui/bouquetlist.cpp b/tuxbox/neutrino/src/gui/bouquetlist.cpp
index 3f36106..07c01d5 100644
--- a/tuxbox/neutrino/src/gui/bouquetlist.cpp
+++ b/tuxbox/neutrino/src/gui/bouquetlist.cpp
@@ -426,8 +426,8 @@ void CBouquetList::paint()
//footbar
int fy = y + theight + listmaxshow * fheight ;
- int ButtonWith = width/3;
+ int ButtonWith = (width - 8) / 3;
int icony = fy + theight / 2 - 12;
frameBuffer->paintBoxRel(x, fy, width, theight, COL_INFOBAR_SHADOW_PLUS_1, RADIUS_MID, CORNER_BOTTOM);
- ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + 4, icony, ButtonWith, sizeof(CBouquetListButtons)/sizeof(CBouquetListButtons[0]), CBouquetListButtons, width);
+ ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + 4, icony, ButtonWith, 6, CBouquetListButtons);
}
diff --git a/tuxbox/neutrino/src/gui/channellist.cpp b/tuxbox/neutrino/src/gui/channellist.cpp
index 09abc7d..0900ca0 100644
--- a/tuxbox/neutrino/src/gui/channellist.cpp
+++ b/tuxbox/neutrino/src/gui/channellist.cpp
@@ -1343,7 +1343,7 @@ struct button_label CChannelListButtons[] =
void CChannelList::paintFoot()
{
- int ButtonWidth = width/4;
+ int ButtonWidth = (width - 20) / 4;
int buttonHeight = 7 + std::min(16, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight());
frameBuffer->paintHLineRel(x, width, y + (height - buttonHeight), COL_INFOBAR_SHADOW_PLUS_0);
@@ -1359,7 +1359,7 @@ void CChannelList::paintFoot()
}
frameBuffer->paintBoxRel(x, y + (height - buttonHeight), width, buttonHeight, COL_INFOBAR_SHADOW_PLUS_1, RADIUS_MID, CORNER_BOTTOM);
- ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + 10, y + (height - buttonHeight), ButtonWidth, sizeof(CChannelListButtons)/sizeof(CChannelListButtons[0]), CChannelListButtons, width);
+ ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + 10, y + (height - buttonHeight), ButtonWidth, 4, CChannelListButtons);
}
void CChannelList::paint()
diff --git a/tuxbox/neutrino/src/gui/epgplus.cpp b/tuxbox/neutrino/src/gui/epgplus.cpp
index f0f59f2..b7f258c 100644
--- a/tuxbox/neutrino/src/gui/epgplus.cpp
+++ b/tuxbox/neutrino/src/gui/epgplus.cpp
@@ -595,7 +595,7 @@ struct button_label buttonLabels[6] =
void EpgPlus::Footer::paintButtons(button_label* _buttonLabels, int numberOfButtons)
{
int yPos = y + getUsedHeight() - fontButtons->getHeight();
- int buttonWidth = (width - 10) / 6; //40
+ int buttonWidth = (width - 10) / numberOfButtons; //40
frameBuffer->paintBoxRel(x, yPos, width, fontButtons->getHeight(), COL_INFOBAR_SHADOW_PLUS_1, RADIUS_MID, CORNER_BOTTOM);
::paintButtons(frameBuffer, fontButtons, g_Locale, x + 5, yPos , buttonWidth, numberOfButtons, _buttonLabels);
diff --git a/tuxbox/neutrino/src/gui/epgview.cpp b/tuxbox/neutrino/src/gui/epgview.cpp
index 9c1e4a0..3a6d67a 100644
--- a/tuxbox/neutrino/src/gui/epgview.cpp
+++ b/tuxbox/neutrino/src/gui/epgview.cpp
@@ -955,7 +955,7 @@ const struct button_label epgviewButtons[3] =
void CEpgData::showTimerEventBar(bool _show)
{
- int ButtonWidth = ox / 4; // 4 cells
+ int ButtonWidth = (ox - 16) / 4; // 4 cells
int fheight = std::max(16, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight()) + BUTTONBAR_FONT_OFFSET;
int by = sy + oy + (fheight >> 3) - 1;
@@ -973,11 +973,11 @@ void CEpgData::showTimerEventBar(bool _show)
::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, sx + 8, by, ButtonWidth, 1, &epgviewButtons[0]);
// Button: Timer Channelswitch
- ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, sx + ButtonWidth, by, ButtonWidth, 1, &epgviewButtons[1]);
+ ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, sx + 8 + ButtonWidth, by, ButtonWidth, 1, &epgviewButtons[1]);
// Button: more screenings
if (!followlist.empty())
- ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, sx + 2 * ButtonWidth, by, ButtonWidth, 1, &epgviewButtons[2]);
+ ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, sx + 8 + 2 * ButtonWidth, by, ButtonWidth, 1, &epgviewButtons[2]);
}
diff --git a/tuxbox/neutrino/src/gui/eventlist.cpp b/tuxbox/neutrino/src/gui/eventlist.cpp
index aaa656d..bfb72ad 100644
--- a/tuxbox/neutrino/src/gui/eventlist.cpp
+++ b/tuxbox/neutrino/src/gui/eventlist.cpp
@@ -805,7 +805,7 @@ struct button_label EventListButtons[5] =
{ "", LOCALE_EVENTFINDER_SEARCH }, // search button
{ "", LOCALE_GENERIC_EMPTY }, // timerlist delete / channelswitch
{ "", LOCALE_EVENTLISTBAR_EVENTSORT }, // sort button
- { "", LOCALE_KEYBINDINGMENU_RELOAD } // reload button
+ { "", LOCALE_EVENTLISTBAR_RELOAD } // reload button
};
void EventList::showFunctionBar (bool show)
@@ -823,7 +823,7 @@ void EventList::showFunctionBar (bool show)
bx = x + 5;
by = y + height - iheight;
- int ButtonWidth = width / 5;
+ int ButtonWidth = (width - 10) / 5;
// -- hide only?
if (!show)
@@ -855,7 +855,7 @@ void EventList::showFunctionBar (bool show)
}
frameBuffer->getIconSize(icon, &iconw, &iconh);
- cellwidth = iconw + 4 + space + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth(btncaption);
+ cellwidth = std::min(ButtonWidth, iconw + 4 + space + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth(btncaption));
// paint 1st button
::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, bx, by, ButtonWidth, 1, &EventListButtons[0]);
@@ -871,7 +871,7 @@ void EventList::showFunctionBar (bool show)
btncaption = g_Locale->getText(LOCALE_EVENTFINDER_SEARCH);
frameBuffer->getIconSize(icon, &iconw, &iconh);
- cellwidth = iconw + 4 + space + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth(btncaption);
+ cellwidth = std::min(ButtonWidth, iconw + 4 + space + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth(btncaption));
// paint second button
::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, bx, by, ButtonWidth, 1, &EventListButtons[1]);
@@ -896,7 +896,7 @@ void EventList::showFunctionBar (bool show)
}
frameBuffer->getIconSize(icon, &iconw, &iconh);
- cellwidth = iconw + 4 + space + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth(btncaption);
+ cellwidth = std::min(ButtonWidth, iconw + 4 + space + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth(btncaption));
// paint 3rd button
::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, bx, by, ButtonWidth, 1, &EventListButtons[2]);
@@ -912,7 +912,7 @@ void EventList::showFunctionBar (bool show)
btncaption = g_Locale->getText(LOCALE_EVENTLISTBAR_EVENTSORT);
frameBuffer->getIconSize(icon, &iconw, &iconh);
- cellwidth = iconw + 4 + space + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth(btncaption);
+ cellwidth = std::min(ButtonWidth, iconw + 4 + space + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth(btncaption));
// paint 4th button
::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, bx, by, ButtonWidth, 1, &EventListButtons[3]);
@@ -926,7 +926,6 @@ void EventList::showFunctionBar (bool show)
EventListButtons[4].button = icon;
// paint 5th button
- btncaption = g_Locale->getText(LOCALE_KEYBINDINGMENU_RELOAD);
::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, bx, by, ButtonWidth, 1, &EventListButtons[4]);
}
diff --git a/tuxbox/neutrino/src/gui/filebrowser.cpp b/tuxbox/neutrino/src/gui/filebrowser.cpp
index e844ec2..819cabc 100644
--- a/tuxbox/neutrino/src/gui/filebrowser.cpp
+++ b/tuxbox/neutrino/src/gui/filebrowser.cpp
@@ -1410,7 +1410,7 @@ void CFileBrowser::paintFoot()
{
int by = y + height - 2 * (foheight - 2);
- ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + 10, by, ButtonWidth, Multi_Select ? 3 : 2, FileBrowserButtons);
+ ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + 10, by, ButtonWidth, Multi_Select ? 3 : 2, FileBrowserButtons, 3 * ButtonWidth);
//Blue-Button
if (Filter != NULL)
@@ -1424,11 +1424,11 @@ void CFileBrowser::paintFoot()
//?-Button
FileBrowserHelpButton[0].locale = sortByNames[g_settings.filebrowser_sortmethod];
- ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + (1 * ButtonWidth), by2, ButtonWidth, 1, FileBrowserHelpButton);
+ ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + 10 + (1 * ButtonWidth), by2, ButtonWidth, 1, FileBrowserHelpButton);
//Mute-Button
if (strncmp(Path.c_str(), VLC_URI, strlen(VLC_URI)) != 0) { //Not in vlc mode
- ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + (2 * ButtonWidth), by2, ButtonWidth, 1, FileBrowserDeleteButton);
+ ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + 10 + (2 * ButtonWidth), by2, ButtonWidth, 1, FileBrowserDeleteButton);
}
if (m_SMSKeyInput.getOldKey() != 0)
diff --git a/tuxbox/neutrino/src/gui/imageinfo.cpp b/tuxbox/neutrino/src/gui/imageinfo.cpp
index 80340ee..be603d2 100644
--- a/tuxbox/neutrino/src/gui/imageinfo.cpp
+++ b/tuxbox/neutrino/src/gui/imageinfo.cpp
@@ -530,9 +530,8 @@ const struct button_label CImageInfoButtons[5] =
void CImageInfo::paintFoot(int xf, int yf)
{
- int ButtonHeight = ssheight;
- frameBuffer->paintBoxRel(xf, yf, width, ButtonHeight, COL_INFOBAR_SHADOW_PLUS_1, RADIUS_MID, CORNER_BOTTOM);
- ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, xf + 5, yf, width/6, 5, CImageInfoButtons, width);
+ frameBuffer->paintBoxRel(xf, yf, width, ssheight, COL_INFOBAR_SHADOW_PLUS_1, RADIUS_MID, CORNER_BOTTOM);
+ ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, xf + 5, yf, (width - 10) / 5, 5, CImageInfoButtons);
}
void CImageInfo::paint()
diff --git a/tuxbox/neutrino/src/gui/infoviewer.cpp b/tuxbox/neutrino/src/gui/infoviewer.cpp
index 320dec5..121f2a6 100644
--- a/tuxbox/neutrino/src/gui/infoviewer.cpp
+++ b/tuxbox/neutrino/src/gui/infoviewer.cpp
@@ -1040,7 +1040,7 @@ void CInfoViewer::showButton(const int button, const bool calledFromMPlayer, con
if (mode == VLC_MODE)
InfobarButtons[SNeutrinoSettings::BUTTON_RED].locale = LOCALE_AUDIOPLAYER_STOP;
else
- InfobarButtons[SNeutrinoSettings::BUTTON_RED].locale = LOCALE_MOVIEPLAYER_TSHELP17;
+ InfobarButtons[SNeutrinoSettings::BUTTON_RED].locale = LOCALE_MOVIEPLAYER_PLUGIN;
}
else
{
@@ -1060,7 +1060,7 @@ void CInfoViewer::showButton(const int button, const bool calledFromMPlayer, con
if(calledFromMPlayer)
{
if (mode == VLC_MODE)
- InfobarButtons[SNeutrinoSettings::BUTTON_GREEN].locale = LOCALE_MOVIEPLAYER_VLCHELP2;
+ InfobarButtons[SNeutrinoSettings::BUTTON_GREEN].locale = LOCALE_MOVIEPLAYER_RESYNC;
else
{
InfobarButtons[SNeutrinoSettings::BUTTON_GREEN].locale = LOCALE_INFOVIEWER_LANGUAGES;
@@ -1139,7 +1139,7 @@ void CInfoViewer::showButton(const int button, const bool calledFromMPlayer, con
}
if (paint)
::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale,
- startX, by, ButtonWidth, 1, &InfobarButtons[button], 720, false, COL_INFOBAR_SHADOW_PLUS_1, txt);
+ startX, by, ButtonWidth, 1, &InfobarButtons[button], 0, false, COL_INFOBAR_SHADOW_PLUS_1, txt);
}
#ifdef ENABLE_RADIOTEXT
diff --git a/tuxbox/neutrino/src/gui/motorcontrol.cpp b/tuxbox/neutrino/src/gui/motorcontrol.cpp
index 20196cd..8fc3b5c 100644
--- a/tuxbox/neutrino/src/gui/motorcontrol.cpp
+++ b/tuxbox/neutrino/src/gui/motorcontrol.cpp
@@ -494,7 +494,8 @@ const struct button_label CMotorControlMenueButtons5[3] =
void CMotorControl::paintMenu()
{
ypos_menue = y + head_height + status_height;
- int buttonwidth = width/2;
+ int buttonsMaxWidth = width - 20;
+ int buttonWidth = buttonsMaxWidth / 2;
int xposButton = x + 10;
int font = SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL;
@@ -511,15 +512,15 @@ void CMotorControl::paintMenu()
ypos_menue += 10;
// buttons 0 / Ok / home
- ::paintButtons(frameBuffer, g_Font[font], g_Locale, xposButton, ypos_menue, buttonwidth-28, 3, CMotorControlMenueButtons1);
+ ::paintButtons(frameBuffer, g_Font[font], g_Locale, xposButton, ypos_menue, buttonWidth - 28, 3, CMotorControlMenueButtons1, buttonsMaxWidth);
// buttons left / right
ypos_menue += mheight;
- ::paintButtons(frameBuffer, g_Font[font], g_Locale, xposButton, ypos_menue, buttonwidth,2, CMotorControlMenueButtons2);
+ ::paintButtons(frameBuffer, g_Font[font], g_Locale, xposButton, ypos_menue, buttonWidth, 2, CMotorControlMenueButtons2, buttonsMaxWidth);
// button red
ypos_menue += mheight;
- ::paintButtons(frameBuffer, g_Font[font], g_Locale, xposButton, ypos_menue, buttonwidth,1, CMotorControlMenueButtons3);
+ ::paintButtons(frameBuffer, g_Font[font], g_Locale, xposButton, ypos_menue, buttonWidth, 1, CMotorControlMenueButtons3, buttonsMaxWidth);
// variant buttons
if (installerMenue)
@@ -541,10 +542,10 @@ void CMotorControl::paintMenu()
CMotorControlMenueButtons4[5].locale = LOCALE_MOTORCONTROL_DECREASE_STEP_SIZE;
}
ypos_menue += mheight;
- ::paintButtons(frameBuffer, g_Font[font], g_Locale, xposButton, ypos_menue, buttonwidth, 6, CMotorControlMenueButtons4, width, true); //vertical
+ ::paintButtons(frameBuffer, g_Font[font], g_Locale, xposButton, ypos_menue, buttonWidth, 6, CMotorControlMenueButtons4, 0, true); //vertical
//ypos_menue += mheight;
- ::paintButtons(frameBuffer, g_Font[font], g_Locale, xposButton+buttonwidth, ypos_menue, buttonwidth, 3, CMotorControlMenueButtons5, width, true); //vertical
+ ::paintButtons(frameBuffer, g_Font[font], g_Locale, xposButton + buttonWidth, ypos_menue, buttonWidth, 3, CMotorControlMenueButtons5, 0, true); //vertical
}
void CMotorControl::startSatFind(void)
diff --git a/tuxbox/neutrino/src/gui/streaminfo2.cpp b/tuxbox/neutrino/src/gui/streaminfo2.cpp
index b8324d7..ab1dffe 100644
--- a/tuxbox/neutrino/src/gui/streaminfo2.cpp
+++ b/tuxbox/neutrino/src/gui/streaminfo2.cpp
@@ -501,8 +501,8 @@ void CStreamInfo2::paint(int/*mode*/)
StreamInfoButtons[0].locale = LOCALE_STREAMINFO_RESIZE;
- ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, xpos, button_y-20, ButtonWidth, 1, &StreamInfoButtons[0], NULL, NULL, COL_MENUCONTENT_PLUS_0);
- ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, width - 110, button_y-20, ButtonWidth, 1, &StreamInfoButtons[1], NULL, NULL, COL_MENUCONTENT_PLUS_0);
+ ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, xpos, button_y - 20, ButtonWidth, 1, &StreamInfoButtons[0], 0, false, COL_MENUCONTENT_PLUS_0);
+ ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, width - 110, button_y - 20, ButtonWidth, 1, &StreamInfoButtons[1], 0, false, COL_MENUCONTENT_PLUS_0);
}
}
diff --git a/tuxbox/neutrino/src/gui/timerlist.cpp b/tuxbox/neutrino/src/gui/timerlist.cpp
index 3d24384..4cd4aeb 100644
--- a/tuxbox/neutrino/src/gui/timerlist.cpp
+++ b/tuxbox/neutrino/src/gui/timerlist.cpp
@@ -779,21 +779,18 @@ void CTimerList::paintHead()
frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_HELP, x + width - iconw - 8, ypos);
}
-const struct button_label TimerListButtons[4] =
+const struct button_label TimerListButtons[5] =
{
- { NEUTRINO_ICON_BUTTON_HOME , LOCALE_MENU_CANCEL },
{ NEUTRINO_ICON_BUTTON_RED , LOCALE_TIMERLIST_DELETE },
{ NEUTRINO_ICON_BUTTON_GREEN , LOCALE_TIMERLIST_NEW },
- { NEUTRINO_ICON_BUTTON_YELLOW, LOCALE_TIMERLIST_RELOAD }
-};
-const struct button_label TimerListButtonOK[1] =
-{
+ { NEUTRINO_ICON_BUTTON_YELLOW, LOCALE_TIMERLIST_RELOAD },
+ { NEUTRINO_ICON_BUTTON_HOME , LOCALE_MENU_CANCEL },
{ NEUTRINO_ICON_BUTTON_OKAY , LOCALE_TIMERLIST_MODIFY }
};
void CTimerList::paintFoot()
{
- int ButtonWidth = (width - 20) / 4;
+ int ButtonWidth = (width - 20) / 5;
int iconw = 0, iconh = 0;
frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_OKAY, &iconw, &iconh);
int footHeight = std::max(iconh, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight());
@@ -801,12 +798,9 @@ void CTimerList::paintFoot()
frameBuffer->paintBoxRel(x, y + height, width, footHeight, COL_INFOBAR_SHADOW_PLUS_1, RADIUS_MID, CORNER_BOTTOM);
if (timerlist.empty())
- ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + ButtonWidth + 10, y + height, ButtonWidth, 3, /*&(*/TimerListButtons/*[1])*/);
+ ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + 10 + ButtonWidth, y + height, ButtonWidth, 3, &(TimerListButtons[1]));
else
- {
- ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + 10, y + height, ButtonWidth, 4, TimerListButtons);
- ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + 10 + width - 1 * ButtonWidth, y + height, ButtonWidth, 1, TimerListButtonOK);
- }
+ ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + 10, y + height, ButtonWidth, 5, TimerListButtons);
}
void CTimerList::paint()
diff --git a/tuxbox/neutrino/src/gui/widget/buttons.cpp b/tuxbox/neutrino/src/gui/widget/buttons.cpp
index 2a652fe..6c43b20 100644
--- a/tuxbox/neutrino/src/gui/widget/buttons.cpp
+++ b/tuxbox/neutrino/src/gui/widget/buttons.cpp
@@ -34,7 +34,7 @@
* buttonwidth set width of button include width of icon, space and caption
* count set count of buttons
* content set iconfile and locale constant, for an empty text let locale constant empty , so you can paint icons without captions,
- * maxwidth optional, default value is 720 (full screenwidth) sets maximal width there can paint buttons, should be the same like width eg. from a menue
+ * maxwidth optional, default value is 0, sets maximal width there can paint buttons, should be the same like width eg. from a menu
* vertical_paint optional, default value is false (horizontal) sets direction of painting
* backgroundcolor optional, default value is COL_INFOBAR_SHADOW_PLUS_1, use it to render font with other backgroundcolor (example: streaminfo2.cpp)
*/
@@ -56,8 +56,10 @@ void paintButtons(CFrameBuffer * const frameBuffer, Font * const font,
int iconh, iconw, max_iconw = 0;
int xstart = x, ystart = y;
int space = 4;
+ unsigned int maxTextwidth = 0;
unsigned int bestButtonwidth = maxwidth/count;
unsigned int maxButtonwidth = bestButtonwidth > buttonwidth ? bestButtonwidth : buttonwidth;
+ unsigned int x_max = x + count * maxButtonwidth;
for (unsigned int i = 0; i < count; i++)
{
@@ -78,10 +80,12 @@ void paintButtons(CFrameBuffer * const frameBuffer, Font * const font,
max_iconw = max_iconw>iconw ? max_iconw : iconw;
// get width of buttontext
- fwidth = ((max_iconw+2*space+real_textwidth) > (maxButtonwidth)) ? maxButtonwidth : real_textwidth;
+ maxTextwidth += maxButtonwidth - max_iconw - space;
+ fwidth = (real_textwidth > maxTextwidth) ? maxTextwidth : real_textwidth;
+ maxTextwidth -= fwidth;
// calculate finally buttonwidth
- bwidth = max_iconw + 2*space + fwidth;
+ bwidth = max_iconw + space + fwidth;
// calculate baseline startposition of icon and text in y
ybase = ystart + fheight - fheight / 2;
@@ -91,7 +95,9 @@ void paintButtons(CFrameBuffer * const frameBuffer, Font * const font,
// paint icon and text
frameBuffer->paintIcon(icon, xstart , yicon_start);
int xbuttontext = xstart + max_iconw + space;
- font->RenderString(xbuttontext, ytext_start, bwidth, buttontext, bcolor /*COL_INFOBAR_SHADOW + 1*/, 0, true); // UTF-8
+ if (xbuttontext + fwidth > x_max)
+ fwidth = x_max - xbuttontext; // don't overflow max width
+ font->RenderString(xbuttontext, ytext_start, fwidth, buttontext, bcolor, 0, true); // UTF-8...
[truncated message content] |