mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 17:31:11 +02:00
keyboard_input: use getItemColors function
Origin commit data
------------------
Commit: a5c9602e4b
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-10-19 (Wed, 19 Oct 2016)
Origin message was:
------------------
- keyboard_input: use getItemColors function
This commit is contained in:
@@ -715,19 +715,10 @@ void CKeyboardInput::paintChar(int pos, std::string &c)
|
|||||||
fb_pixel_t color;
|
fb_pixel_t color;
|
||||||
fb_pixel_t bgcolor;
|
fb_pixel_t bgcolor;
|
||||||
|
|
||||||
if (pos == selected)
|
getItemColors(color, bgcolor, pos == selected);
|
||||||
{
|
|
||||||
color = COL_MENUCONTENTSELECTED_TEXT;
|
|
||||||
bgcolor = COL_MENUCONTENTSELECTED_PLUS_0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
color = COL_MENUCONTENT_TEXT;
|
|
||||||
bgcolor = COL_MENUCONTENT_PLUS_0;
|
|
||||||
}
|
|
||||||
|
|
||||||
frameBuffer->paintBoxRel(xpos, ypos, input_w, input_h, COL_MENUCONTENT_PLUS_2);
|
frameBuffer->paintBoxRel(xpos, ypos, input_w, input_h, bgcolor);
|
||||||
frameBuffer->paintBoxRel(xpos+ 1, ypos+ 1, input_w- 2, input_h- 2, bgcolor);
|
frameBuffer->paintBoxFrame(xpos, ypos, input_w, input_h, 1, COL_MENUCONTENT_PLUS_2);
|
||||||
|
|
||||||
int ch_w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(c);
|
int ch_w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(c);
|
||||||
int ch_x = xpos + std::max(input_w/2 - ch_w/2, 0);
|
int ch_x = xpos + std::max(input_w/2 - ch_w/2, 0);
|
||||||
@@ -749,17 +740,14 @@ void CKeyboardInput::paintKey(int row, int column)
|
|||||||
//key_y = y+ hheight+ offset+ input_h+ offset;
|
//key_y = y+ hheight+ offset+ input_h+ offset;
|
||||||
int ypos = key_y + (key_h + KEY_BORDER)*row;
|
int ypos = key_y + (key_h + KEY_BORDER)*row;
|
||||||
|
|
||||||
|
int i_selected = (focus == FOCUS_KEY && row == srow && column == scol);
|
||||||
|
|
||||||
fb_pixel_t color;
|
fb_pixel_t color;
|
||||||
fb_pixel_t bgcolor;
|
fb_pixel_t bgcolor;
|
||||||
if (focus == FOCUS_KEY && row == srow && column == scol) {
|
|
||||||
color = COL_MENUCONTENTSELECTED_TEXT;
|
|
||||||
bgcolor = COL_MENUCONTENTSELECTED_PLUS_0;
|
|
||||||
} else {
|
|
||||||
color = COL_MENUCONTENT_TEXT;
|
|
||||||
bgcolor = COL_MENUCONTENT_PLUS_0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int radius = CORNER_RADIUS_SMALL;
|
getItemColors(color, bgcolor, i_selected);
|
||||||
|
|
||||||
|
int radius = RADIUS_SMALL;
|
||||||
frameBuffer->paintBoxRel(xpos, ypos, key_w, key_h, bgcolor, radius);
|
frameBuffer->paintBoxRel(xpos, ypos, key_w, key_h, bgcolor, radius);
|
||||||
frameBuffer->paintBoxFrame(xpos, ypos, key_w, key_h, KEY_FRAME_WIDTH, COL_FRAME_PLUS_0, radius);
|
frameBuffer->paintBoxFrame(xpos, ypos, key_w, key_h, KEY_FRAME_WIDTH, COL_FRAME_PLUS_0, radius);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user