neutrino: make button bar use available space intelligently

modify the paintButtons() function, so that it spreads the buttons
over the available width with constant space between them.
Port over all users to the new method and clean up quite some custom
button drawing code on the way.

Attention: This code is GPL v3+ only for now!
This commit is contained in:
Stefan Seyfried
2011-10-03 19:41:19 +02:00
parent 90bb145049
commit 2f65aea744
16 changed files with 192 additions and 191 deletions

View File

@@ -1097,10 +1097,12 @@ void CEpgData::showTimerEventBar (bool pshow)
frameBuffer->paintBoxRel(sx,y,ox,h, COL_INFOBAR_SHADOW_PLUS_1, RADIUS_LARGE, CORNER_BOTTOM);//round
/* 2 * ICON_LARGE_WIDTH for potential 16:9 and DD icons */
int aw = ox - 20 - 2 * (ICON_LARGE_WIDTH + 2);
if (g_settings.recording_type != CNeutrinoApp::RECORDING_OFF)
::paintButtons(x, y, 0, 2, EpgButtons, h);
::paintButtons(x, y, 0, 2, EpgButtons, aw, h);
else
::paintButtons(x, y, 0, 1, &EpgButtons[1], h);
::paintButtons(x, y, 0, 1, &EpgButtons[1], aw, h);
#if 0
// Button: Timer Record & Channelswitch