mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 08:51:04 +02:00
stringinput: fix rounded corners for SMS stringinput
The SMS stringinput method has a button bar below the input field,
so the rounded corners are on the button bar instead of the input
field.
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1377 e54a6e83-5905-42d5-8d5c-058d10e6a962
Origin commit data
------------------
Commit: 2cefa91372
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2011-04-06 (Wed, 06 Apr 2011)
This commit is contained in:
@@ -532,13 +532,20 @@ const char * CStringInput::getHint1(void)
|
||||
return g_Locale->getText(hint_1);
|
||||
}
|
||||
|
||||
void CStringInput::paint()
|
||||
void CStringInput::paint(bool buttons)
|
||||
{
|
||||
int iconoffset;
|
||||
int icol_w, icol_h;
|
||||
int radius;
|
||||
|
||||
/* if there's a button bar below the stringinput (SMS), no rounded corners */
|
||||
if (buttons)
|
||||
radius = 0;
|
||||
else
|
||||
radius = RADIUS_LARGE;
|
||||
|
||||
frameBuffer->paintBoxRel(x, y, width, hheight, COL_MENUHEAD_PLUS_0, RADIUS_LARGE, CORNER_TOP); //round
|
||||
frameBuffer->paintBoxRel(x, y + hheight, width, height - hheight, COL_MENUCONTENT_PLUS_0, RADIUS_LARGE, CORNER_BOTTOM);
|
||||
frameBuffer->paintBoxRel(x, y + hheight, width, height - hheight, COL_MENUCONTENT_PLUS_0, radius, CORNER_BOTTOM);
|
||||
|
||||
if (!(iconfile.empty()))
|
||||
{
|
||||
@@ -743,9 +750,9 @@ const struct button_label CStringInputSMSButtons[2] =
|
||||
{ NEUTRINO_ICON_BUTTON_YELLOW, LOCALE_STRINGINPUT_CLEAR }
|
||||
};
|
||||
|
||||
void CStringInputSMS::paint()
|
||||
void CStringInputSMS::paint(bool /*unused*/)
|
||||
{
|
||||
CStringInput::paint();
|
||||
CStringInput::paint(true);
|
||||
|
||||
frameBuffer->paintIcon(NEUTRINO_ICON_NUMERIC_PAD, x+20+140, y+ hheight+ mheight+ iheight* 3+ 30, 0, COL_MENUCONTENT);
|
||||
|
||||
|
@@ -70,7 +70,7 @@ class CStringInput : public CMenuTarget
|
||||
virtual void init();
|
||||
virtual const char * getHint1(void);
|
||||
|
||||
virtual void paint();
|
||||
virtual void paint(bool buttons = false);
|
||||
virtual void paintChar(int pos, char c);
|
||||
virtual void paintChar(int pos);
|
||||
|
||||
@@ -121,7 +121,7 @@ class CStringInputSMS : public CStringInput
|
||||
virtual void keyLeftPressed();
|
||||
virtual void keyRightPressed();
|
||||
|
||||
virtual void paint();
|
||||
virtual void paint(bool dummy = false);
|
||||
void initSMS(const char * const Valid_Chars);
|
||||
|
||||
public:
|
||||
|
Reference in New Issue
Block a user