Color setup: add button bar

Origin commit data
------------------
Commit: 411c3f091c
Author: Thilo Graf <dbt@novatux.de>
Date: 2018-04-11 (Wed, 11 Apr 2018)
This commit is contained in:
2018-04-11 23:58:15 +02:00
committed by vanhofen
parent f57c44ae8c
commit ebb148afb9
5 changed files with 12 additions and 2 deletions

View File

@@ -377,6 +377,7 @@ colormenusetup.menucontent_inactive Fensterinhalt deaktiviert
colormenusetup.menucontent_selected Fensterinhalt selektiert colormenusetup.menucontent_selected Fensterinhalt selektiert
colormenusetup.menufoot Fußleiste colormenusetup.menufoot Fußleiste
colormenusetup.menuhead Titelleiste colormenusetup.menuhead Titelleiste
colorsetup.save Speichern
colorstatusbar.text Infobar colorstatusbar.text Infobar
colorthememenu.head Theme auswählen colorthememenu.head Theme auswählen
colorthememenu.head2 Themes laden colorthememenu.head2 Themes laden

View File

@@ -377,6 +377,7 @@ colormenusetup.menucontent_inactive Content inactive
colormenusetup.menucontent_selected Content selected colormenusetup.menucontent_selected Content selected
colormenusetup.menufoot Footer colormenusetup.menufoot Footer
colormenusetup.menuhead Header colormenusetup.menuhead Header
colorsetup.save Save
colorstatusbar.text Infobar colorstatusbar.text Infobar
colorthememenu.head Select theme colorthememenu.head Select theme
colorthememenu.head2 Load themes colorthememenu.head2 Load themes

View File

@@ -292,7 +292,7 @@ int CColorChooser::exec(CMenuTarget* parent, const std::string &)
void CColorChooser::hide() void CColorChooser::hide()
{ {
frameBuffer->paintBackgroundBoxRel(x, y, width + OFFSET_SHADOW, height + OFFSET_SHADOW); frameBuffer->paintBackgroundBoxRel(x, y, width + OFFSET_SHADOW, height + header_height + OFFSET_SHADOW);
} }
void CColorChooser::paint() void CColorChooser::paint()
@@ -301,10 +301,16 @@ void CColorChooser::paint()
header.enableShadow(CC_SHADOW_RIGHT | CC_SHADOW_CORNER_TOP_RIGHT | CC_SHADOW_CORNER_BOTTOM_RIGHT); header.enableShadow(CC_SHADOW_RIGHT | CC_SHADOW_CORNER_TOP_RIGHT | CC_SHADOW_CORNER_BOTTOM_RIGHT);
header.paint(CC_SAVE_SCREEN_NO); header.paint(CC_SAVE_SCREEN_NO);
PaintBoxRel(x, y + header_height, width, height - header_height, COL_MENUCONTENT_PLUS_0, RADIUS_LARGE, CORNER_BOTTOM, CC_SHADOW_ON);
PaintBoxRel(x, y + header_height, width, height - header_height, COL_MENUCONTENT_PLUS_0, RADIUS_NONE, CORNER_NONE, CC_SHADOW_RIGHT | CC_SHADOW_CORNER_TOP_RIGHT | CC_SHADOW_CORNER_BOTTOM_RIGHT);
for (int i = 0; i < VALUES; i++) for (int i = 0; i < VALUES; i++)
paintSlider(x, y + header_height + OFFSET_INNER_SMALL + i*item_height, value[i], colorchooser_names[i], icon_names[i], (i == 0)); paintSlider(x, y + header_height + OFFSET_INNER_SMALL + i*item_height, value[i], colorchooser_names[i], icon_names[i], (i == 0));
CComponentsFooter footer(x, y + height, width , 0, CComponentsFooter::CC_BTN_LEFT | CComponentsFooter::CC_BTN_UP | CComponentsFooter::CC_BTN_DOWN | CComponentsFooter::CC_BTN_RIGHT);
footer.setButtonLabel(NEUTRINO_ICON_BUTTON_OKAY, LOCALE_COLORSETUP_SAVE, width/3);
footer.enableShadow(CC_SHADOW_ON);
footer.paint(CC_SAVE_SCREEN_NO);
} }
void CColorChooser::paintSlider(int px, int py, unsigned char *spos, const neutrino_locale_t text, const char * const iconname, const bool selected) void CColorChooser::paintSlider(int px, int py, unsigned char *spos, const neutrino_locale_t text, const char * const iconname, const bool selected)

View File

@@ -404,6 +404,7 @@ typedef enum
LOCALE_COLORMENUSETUP_MENUCONTENT_SELECTED, LOCALE_COLORMENUSETUP_MENUCONTENT_SELECTED,
LOCALE_COLORMENUSETUP_MENUFOOT, LOCALE_COLORMENUSETUP_MENUFOOT,
LOCALE_COLORMENUSETUP_MENUHEAD, LOCALE_COLORMENUSETUP_MENUHEAD,
LOCALE_COLORSETUP_SAVE,
LOCALE_COLORSTATUSBAR_TEXT, LOCALE_COLORSTATUSBAR_TEXT,
LOCALE_COLORTHEMEMENU_HEAD, LOCALE_COLORTHEMEMENU_HEAD,
LOCALE_COLORTHEMEMENU_HEAD2, LOCALE_COLORTHEMEMENU_HEAD2,

View File

@@ -404,6 +404,7 @@ const char * locale_real_names[] =
"colormenusetup.menucontent_selected", "colormenusetup.menucontent_selected",
"colormenusetup.menufoot", "colormenusetup.menufoot",
"colormenusetup.menuhead", "colormenusetup.menuhead",
"colorsetup.save",
"colorstatusbar.text", "colorstatusbar.text",
"colorthememenu.head", "colorthememenu.head",
"colorthememenu.head2", "colorthememenu.head2",