Code: Alles auswählen
diff -Naur original/hintbox.cpp roundCorner/hintbox.cpp
--- original/hintbox.cpp 2007-11-08 12:29:27.000000000 +0100
+++ roundCorner/hintbox.cpp 2008-03-02 23:58:53.000000000 +0100
@@ -39,7 +39,7 @@
#include <global.h>
#include <neutrino.h>
-#define borderwidth 4
+#define borderwidth 5
#define HINTBOX_MAX_HEIGHT 420
@@ -147,10 +147,8 @@
return;
}
- window->paintBoxRel(borderwidth, height, width, borderwidth, COL_INFOBAR_SHADOW);
- window->paintBoxRel(width, borderwidth, borderwidth, height - borderwidth, COL_INFOBAR_SHADOW);
-
- window->paintBoxRel(0, 0, width, theight, (CFBWindow::color_t)COL_MENUHEAD_PLUS_0);
+ window->paintBoxRel(borderwidth, borderwidth, width, (entries_per_page + 1) * fheight + theight, (CFBWindow::color_t)COL_INFOBAR_SHADOW, 20);
+ window->paintBoxRel(0, 0, width, theight, (CFBWindow::color_t)COL_MENUHEAD_PLUS_0, 20, CORNER_TOP);
if (!iconfile.empty())
{
@@ -160,7 +158,10 @@
else
window->RenderString(g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE], 10, theight, width - 10, g_Locale->getText(caption), (CFBWindow::color_t)COL_MENUHEAD, 0, true); // UTF-8
- window->paintBoxRel(0, theight, width, (entries_per_page + 1) * fheight, (CFBWindow::color_t)COL_MENUCONTENT_PLUS_0);
+ if ( entries_per_page > 1 )
+ window->paintBoxRel(0, theight, width, (entries_per_page + 1) * fheight, (CFBWindow::color_t)COL_MENUCONTENT_PLUS_0);
+ else
+ window->paintBoxRel(0, theight, width, (entries_per_page + 1) * fheight, (CFBWindow::color_t)COL_MENUCONTENT_PLUS_0, 20, CORNER_BOTTOM);
int count = entries_per_page;
int ypos = theight + (fheight >> 1);
diff -Naur original/hintboxext.cpp roundCorner/hintboxext.cpp
--- original/hintboxext.cpp 2007-11-08 12:29:27.000000000 +0100
+++ roundCorner/hintboxext.cpp 2008-03-02 23:58:53.000000000 +0100
@@ -42,7 +42,7 @@
#include <iostream>
-#define borderwidth 4
+#define borderwidth 5
#define HINTBOXEXT_MAX_HEIGHT 420
@@ -216,13 +216,11 @@
{
return;
}
- // bottom shadow
- m_window->paintBoxRel(borderwidth, m_height, m_width, borderwidth, COL_INFOBAR_SHADOW);
- // right shadow
- m_window->paintBoxRel(m_width, borderwidth, borderwidth, m_height - borderwidth, COL_INFOBAR_SHADOW);
-
+
+ // shadow
+ m_window->paintBoxRel(borderwidth, borderwidth, m_width, m_height, (CFBWindow::color_t)COL_INFOBAR_SHADOW, 20);
// title
- m_window->paintBoxRel(0, 0, m_width, m_theight, (CFBWindow::color_t)COL_MENUHEAD_PLUS_0);
+ m_window->paintBoxRel(0, 0, m_width, m_theight, (CFBWindow::color_t)COL_MENUHEAD_PLUS_0, 20, CORNER_TOP);
if (!m_iconfile.empty())
{
diff -Naur original/menue.cpp roundCorner/menue.cpp
--- original/menue.cpp 2008-02-15 23:31:14.000000000 +0100
+++ roundCorner/menue.cpp 2008-03-16 00:32:24.000000000 +0100
@@ -58,8 +58,6 @@
CMenuSeparator * const GenericMenuSeparatorLine = &CGenericMenuSeparatorLine;
CMenuForwarder * const GenericMenuBack = &CGenericMenuBack;
-
-
void CMenuItem::init(const int X, const int Y, const int DX, const int OFFX)
{
x = X;
@@ -122,6 +120,7 @@
(item != GenericMenuBack))
delete item;
}
+
items.clear();
page_start.clear();
}
@@ -305,7 +304,7 @@
void CMenuWidget::hide()
{
- frameBuffer->paintBackgroundBoxRel(x, y, width+15,height );
+ frameBuffer->paintBackgroundBoxRel(x, y, width+15,height);
}
void CMenuWidget::paint()
@@ -368,7 +367,7 @@
else
sb_width=0;
- frameBuffer->paintBoxRel(x,y, width+sb_width,hheight, COL_MENUHEAD_PLUS_0);
+ frameBuffer->paintBoxRel(x,y, width+sb_width,hheight, COL_MENUHEAD_PLUS_0, 1, CORNER_TOP);
g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+38,y+hheight+1, width-40, l_name, COL_MENUHEAD, 0, true); // UTF-8
frameBuffer->paintIcon(iconfile, x + 8, y + 5);
@@ -396,6 +395,7 @@
frameBuffer->paintBoxRel(x+ width +2, item_start_y+ 2+ current_page*(item_height-4)/total_pages, 11, (item_height-4)/total_pages, COL_MENUCONTENT_PLUS_3);
}
frameBuffer->paintBoxRel(x,item_start_y, width,item_height, COL_MENUCONTENT_PLUS_0);
+
int ypos=item_start_y;
for (unsigned int count = 0; count < items.size(); count++)
{
@@ -460,18 +460,20 @@
unsigned char color = COL_MENUCONTENT;
fb_pixel_t bgcolor = COL_MENUCONTENT_PLUS_0;
+ int round = 0;
+
if (selected)
{
color = COL_MENUCONTENTSELECTED;
bgcolor = COL_MENUCONTENTSELECTED_PLUS_0;
- }
- if (!active)
+ round = 1;
+ } else if (!active)
{
color = COL_MENUCONTENTINACTIVE;
bgcolor = COL_MENUCONTENTINACTIVE_PLUS_0;
}
- frameBuffer->paintBoxRel(x, y, dx, height, bgcolor);
+ frameBuffer->paintBoxRel(x, y, dx, height, bgcolor, round);
const char * l_option;
char option_value[11];
@@ -502,9 +504,6 @@
return y+height;
}
-
-
-
CMenuOptionChooser::CMenuOptionChooser(const neutrino_locale_t OptionName, int * const OptionValue, const struct keyval * const Options, const unsigned Number_Of_Options, const bool Active, CChangeObserver * const Observ, const neutrino_msg_t DirectKey, const std::string & IconName)
{
height = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
@@ -579,18 +578,20 @@
unsigned char color = COL_MENUCONTENT;
fb_pixel_t bgcolor = COL_MENUCONTENT_PLUS_0;
+ int round = 0;
+
if (selected)
{
color = COL_MENUCONTENTSELECTED;
bgcolor = COL_MENUCONTENTSELECTED_PLUS_0;
- }
- if (!active)
+ round = 1;
+ } else if (!active)
{
color = COL_MENUCONTENTINACTIVE;
bgcolor = COL_MENUCONTENTINACTIVE_PLUS_0;
}
- frameBuffer->paintBoxRel(x, y, dx, height, bgcolor);
+ frameBuffer->paintBoxRel(x, y, dx, height, bgcolor, round);
neutrino_locale_t option = NONEXISTANT_LOCALE;
@@ -687,20 +688,24 @@
int CMenuOptionStringChooser::paint( bool selected )
{
+ CFrameBuffer * frameBuffer = CFrameBuffer::getInstance();
+
unsigned char color = COL_MENUCONTENT;
fb_pixel_t bgcolor = COL_MENUCONTENT_PLUS_0;
+ int round = 0;
+
if (selected)
{
color = COL_MENUCONTENTSELECTED;
bgcolor = COL_MENUCONTENTSELECTED_PLUS_0;
- }
- if (!active)
+ round = 1;
+ } else if (!active)
{
color = COL_MENUCONTENTINACTIVE;
bgcolor = COL_MENUCONTENTINACTIVE_PLUS_0;
}
- CFrameBuffer::getInstance()->paintBoxRel(x, y, dx, height, bgcolor);
+ frameBuffer->paintBoxRel(x, y, dx, height, bgcolor, round);
int stringwidth = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(optionValue);
int stringstartposName = x + offx + 10;
@@ -770,15 +775,20 @@
int CMenuOptionLanguageChooser::paint( bool selected )
{
+ CFrameBuffer * frameBuffer = CFrameBuffer::getInstance();
+
unsigned char color = COL_MENUCONTENT;
fb_pixel_t bgcolor = COL_MENUCONTENT_PLUS_0;
+ int round = 0;
+
if (selected)
{
color = COL_MENUCONTENTSELECTED;
bgcolor = COL_MENUCONTENTSELECTED_PLUS_0;
+ round = 1;
}
- CFrameBuffer::getInstance()->paintBoxRel(x, y, dx, height, bgcolor);
+ frameBuffer->paintBoxRel(x, y, dx, height, bgcolor, round);
// int stringwidth = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(optionValue);//unused variable
int stringstartposOption = x + offx + 10;
@@ -875,18 +885,21 @@
unsigned char color = COL_MENUCONTENT;
fb_pixel_t bgcolor = COL_MENUCONTENT_PLUS_0;
+ int round = 0;
+
if (selected)
{
color = COL_MENUCONTENTSELECTED;
bgcolor = COL_MENUCONTENTSELECTED_PLUS_0;
- }
- if (!active)
+ round = 1;
+ } else if (!active)
{
color = COL_MENUCONTENTINACTIVE;
bgcolor = COL_MENUCONTENTINACTIVE_PLUS_0;
}
- frameBuffer->paintBoxRel(x, y, dx, height, bgcolor);
+ frameBuffer->paintBoxRel(x, y, dx, height, bgcolor, round);
+
g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(stringstartposX, y+ height, dx- (stringstartposX - x), l_text, color, 0, true); // UTF-8
if (!iconName.empty())
@@ -988,6 +1001,7 @@
}
}
}
+
return y+ height;
}
diff -Naur original/messagebox.cpp roundCorner/messagebox.cpp
--- original/messagebox.cpp 2005-03-28 16:17:53.000000000 +0200
+++ roundCorner/messagebox.cpp 2008-03-02 23:58:53.000000000 +0100
@@ -73,9 +73,9 @@
uint8_t color;
fb_pixel_t bgcolor;
- m_window->paintBoxRel(0, m_height - (m_fheight << 1), m_width, (m_fheight << 1), (CFBWindow::color_t)COL_MENUCONTENT_PLUS_0);
+ m_window->paintBoxRel(0, m_height - (m_fheight << 1), m_width, (m_fheight << 1), (CFBWindow::color_t)COL_MENUCONTENT_PLUS_0, 20, CORNER_BOTTOM);
- //irgendwann alle vergleichen - aber cancel ist sicher der längste
+ //irgendwann alle vergleichen - aber cancel ist sicher der lï¿œngste
int MaxButtonTextWidth = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth(g_Locale->getText(LOCALE_MESSAGEBOX_CANCEL), true); // UTF-8
int ButtonWidth = 20 + 33 + MaxButtonTextWidth;
@@ -99,7 +99,7 @@
color = COL_INFOBAR_SHADOW;
bgcolor = COL_INFOBAR_SHADOW_PLUS_0;
}
- m_window->paintBoxRel(xpos, m_height - m_fheight - 20, ButtonWidth, m_fheight, (CFBWindow::color_t)bgcolor);
+ m_window->paintBoxRel(xpos, m_height - m_fheight - 20, ButtonWidth, m_fheight, (CFBWindow::color_t)bgcolor, 1);
m_window->paintIcon(NEUTRINO_ICON_BUTTON_RED, xpos + 14, m_height - m_fheight - 15);
m_window->RenderString(g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], xpos + 43, m_height-m_fheight+4, ButtonWidth- 53, g_Locale->getText(LOCALE_MESSAGEBOX_YES), (CFBWindow::color_t)color, 0, true); // UTF-8
}
@@ -119,7 +119,7 @@
bgcolor = COL_INFOBAR_SHADOW_PLUS_0;
}
- m_window->paintBoxRel(xpos, m_height-m_fheight-20, ButtonWidth, m_fheight, (CFBWindow::color_t)bgcolor);
+ m_window->paintBoxRel(xpos, m_height-m_fheight-20, ButtonWidth, m_fheight, (CFBWindow::color_t)bgcolor, 1);
m_window->paintIcon(NEUTRINO_ICON_BUTTON_GREEN, xpos+14, m_height-m_fheight-15);
m_window->RenderString(g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], xpos + 43, m_height-m_fheight+4, ButtonWidth- 53, g_Locale->getText(LOCALE_MESSAGEBOX_NO), (CFBWindow::color_t)color, 0, true); // UTF-8
}
@@ -139,7 +139,7 @@
bgcolor = COL_INFOBAR_SHADOW_PLUS_0;
}
- m_window->paintBoxRel(xpos, m_height-m_fheight-20, ButtonWidth, m_fheight, (CFBWindow::color_t)bgcolor);
+ m_window->paintBoxRel(xpos, m_height-m_fheight-20, ButtonWidth, m_fheight, (CFBWindow::color_t)bgcolor, 1);
m_window->paintIcon(NEUTRINO_ICON_BUTTON_HOME, xpos+10, m_height-m_fheight-19);
m_window->RenderString(g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], xpos + 43, m_height-m_fheight+4, ButtonWidth- 53, g_Locale->getText((showbuttons & mbCancel) ? LOCALE_MESSAGEBOX_CANCEL : LOCALE_MESSAGEBOX_BACK), (CFBWindow::color_t)color, 0, true); // UTF-8
}