mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 17:01:15 +02:00
color setup: Visualize color rate
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
#include <driver/fontrenderer.h>
|
||||
#include <driver/rcinput.h>
|
||||
#include <driver/screen_max.h>
|
||||
#include <system/helpers.h>
|
||||
|
||||
#include <gui/color.h>
|
||||
#include <gui/widget/msgbox.h>
|
||||
@@ -299,9 +300,16 @@ void CColorChooser::paintSlider(int px, int py, unsigned char *spos, const neutr
|
||||
So long we paint a simple frame. This is more save on higher resolutions.
|
||||
*/
|
||||
//frameBuffer->paintIcon(NEUTRINO_ICON_SLIDER_BODY, px + text_width + 2*OFFSET_INNER_MID + bar_offset, py, item_height);
|
||||
frameBuffer->paintBoxFrame(px + text_width + 2*OFFSET_INNER_MID + bar_offset, py + item_height/3, bar_width, item_height/3, 1, COL_FRAME_PLUS_0);
|
||||
// paint slider
|
||||
frameBuffer->paintIcon(selected ? iconname : NEUTRINO_ICON_SLIDER_INACTIVE, px + text_width + 2*OFFSET_INNER_MID + ((*spos)*bar_width / 100), py, item_height);
|
||||
int w_col_rate = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth("100");
|
||||
int w_bar = bar_width - w_col_rate;
|
||||
int x_bar = px + text_width + 2*OFFSET_INNER_MID + bar_offset;
|
||||
frameBuffer->paintBoxFrame(x_bar, py + item_height/3, w_bar, item_height/3, 1, COL_FRAME_PLUS_0);
|
||||
|
||||
// paint slider
|
||||
frameBuffer->paintIcon(selected ? iconname : NEUTRINO_ICON_SLIDER_INACTIVE, px + text_width + 2*OFFSET_INNER_MID + ((*spos)*w_bar / 100), py, item_height);
|
||||
|
||||
// paint color name
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(px + OFFSET_INNER_MID, py + item_height, text_width, g_Locale->getText(text), COL_MENUCONTENT_TEXT);
|
||||
// paint color rate
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x_bar + w_bar + OFFSET_INNER_MID, py + item_height, w_col_rate, to_string(*spos), COL_MENUCONTENT_TEXT);
|
||||
}
|
||||
|
Reference in New Issue
Block a user