diff --git a/src/driver/fb_window.h b/src/driver/fb_window.h index 36110386d..63181177f 100644 --- a/src/driver/fb_window.h +++ b/src/driver/fb_window.h @@ -44,7 +44,7 @@ class CFBWindow CFBWindow(const int _x, const int _y, const int _dx, const int _dy); ~CFBWindow(); - void paintBoxRel(const int _x, const int _y, const int _dx, const int _dy, const color_t _col, int radius = 0, int type = 0); + void paintBoxRel(const int _x, const int _y, const int _dx, const int _dy, const color_t _col, int radius = 0, int type = 0xF); bool paintIcon(const char * const _filename, const int _x, const int _y, const color_t _offset = 1); void RenderString(const font_t _font, const int _x, const int _y, const int _width, const char * const _text, const color_t _color, const int _boxheight = 0, const bool _utf8_encoded = false); }; diff --git a/src/driver/framebuffer.cpp b/src/driver/framebuffer.cpp index 9e66ae65a..8a889f3f3 100644 --- a/src/driver/framebuffer.cpp +++ b/src/driver/framebuffer.cpp @@ -500,6 +500,10 @@ void CFrameBuffer::paintBoxRel(const int x, const int y, const int dx, const int if (!getActive()) return; + int corner_tl = (type & CORNER_TOP_LEFT) ? 1 : 0; + int corner_tr = (type & CORNER_TOP_RIGHT) ? 1 : 0; + int corner_bl = (type & CORNER_BOTTOM_LEFT) ? 1 : 0; + int corner_br = (type & CORNER_BOTTOM_RIGHT) ? 1 : 0; #ifdef USE_NEVIS_GXA /* this table contains the x coordinates for a quarter circle (the bottom right quarter) with fixed radius of 540 px which is the half of the max HD graphics size of 1080 px. So with that table we @@ -543,7 +547,7 @@ void CFrameBuffer::paintBoxRel(const int x, const int y, const int dx, const int if ((type) && (radius)) { #define MUL 32768 /* just an multiplicator for all math to reduce rounding errors */ - int ofs, scf, scl; + int ofs, scf, scl, ofl, ofr; /* limit the radius */ if (radius > dx) @@ -559,26 +563,31 @@ void CFrameBuffer::paintBoxRel(const int x, const int y, const int dx, const int while (line < dy) { - ofs = 0; + ofl = ofr = 0; - if ((line < radius) && (type & 1)) + if (line < radius && (type & CORNER_TOP)) /* one of the top corners */ { /* uper round corners */ scl = scf * (radius - line) / MUL; if ((scf * (radius - line) % MUL) >= (MUL / 2)) /* round up */ scl++; ofs = radius - (q_circle[scl] * MUL / scf); + // ofl = corner_tl * ofs; // might depend on the arch if multiply is faster or not + ofl = corner_tl ? ofs : 0; + ofr = corner_tr ? ofs : 0; } - else if ((line >= (dy - radius)) && (type & 2)) + else if ((line >= dy - radius) && (type & CORNER_BOTTOM)) /* one of the bottom corners */ { /* lower round corners */ scl = scf * (radius - (dy - (line + 1))) / MUL; if ((scf * (radius - (dy - (line + 1))) % MUL) >= (MUL / 2)) /* round up */ scl++; ofs = radius - (q_circle[scl] * MUL / scf); + ofl = corner_bl ? ofs : 0; + ofr = corner_br ? ofs : 0; } - _write_gxa(gxa_base, cmd, GXA_POINT(x + dx - ofs, y + line)); /* endig point */ - _write_gxa(gxa_base, cmd, GXA_POINT(x + ofs, y + line)); /* start point */ + _write_gxa(gxa_base, cmd, GXA_POINT(x + dx - ofr, y + line)); /* endig point */ + _write_gxa(gxa_base, cmd, GXA_POINT(x + ofl, y + line)); /* start point */ line++; } @@ -594,6 +603,7 @@ void CFrameBuffer::paintBoxRel(const int x, const int y, const int dx, const int } #else +#error TODO: please fix the rounded corner code for !USE_NEVIS_GXA case int F,R=radius,sx,sy,dxx=dx,dyy=dy,rx,ry,wx,wy; if (!getActive()) diff --git a/src/driver/framebuffer.h b/src/driver/framebuffer.h index 02626b3b4..116b10c36 100644 --- a/src/driver/framebuffer.h +++ b/src/driver/framebuffer.h @@ -36,22 +36,24 @@ typedef struct fb_var_screeninfo t_fb_var_screeninfo; -#if 0 -#define CORNER_TOP_LEFT 0x1 -#define CORNER_TOP_RIGHT 0x2 -#define CORNER_TOP 0x3 -#define CORNER_BOTTOM_RIGHT 0x4 -#define CORNER_RIGHT 0x6 -#define CORNER_BOTTOM_LEFT 0x8 -#define CORNER_LEFT 0x9 -#define CORNER_BOTTOM 0xC -#endif - +#if 1 +#define CORNER_TOP_LEFT 0x1 +#define CORNER_TOP_RIGHT 0x2 +#define CORNER_TOP 0x3 +#define CORNER_BOTTOM_RIGHT 0x4 +#define CORNER_RIGHT 0x6 +#define CORNER_BOTTOM_LEFT 0x8 +#define CORNER_LEFT 0x9 +#define CORNER_BOTTOM 0xC +#define CORNER_ALL 0xF +#define SHADOW_OFFSET 6 +#else #define CORNER_TOP 0x1 #define CORNER_BOTTOM 0x2 #define CORNER_BOTH 0x3 +#endif -/** Ausführung als Singleton */ +/** Ausfuehrung als Singleton */ class CFrameBuffer { private: @@ -150,7 +152,7 @@ class CFrameBuffer }; void paintPixel(int x, int y, const fb_pixel_t col); - void paintBoxRel(const int x, const int y, const int dx, const int dy, const fb_pixel_t col, int radius = 0, int type = 0); + void paintBoxRel(const int x, const int y, const int dx, const int dy, const fb_pixel_t col, int radius = 0, int type = CORNER_ALL); inline void paintBox(int xa, int ya, int xb, int yb, const fb_pixel_t col) { paintBoxRel(xa, ya, xb - xa, yb - ya, col); } inline void paintBox(int xa, int ya, int xb, int yb, const fb_pixel_t col, int radius, int type) { paintBoxRel(xa, ya, xb - xa, yb - ya, col, radius, type); } diff --git a/src/gui/audioplayer.cpp b/src/gui/audioplayer.cpp index f0bdc5721..c5fd13bf4 100644 --- a/src/gui/audioplayer.cpp +++ b/src/gui/audioplayer.cpp @@ -1905,8 +1905,8 @@ void CAudioPlayerGui::paintItemID3DetailsLine (int pos) if (!m_playlist.empty() && (pos >= 0)) { // 1. col thick line - m_frameBuffer->paintBoxRel(xpos + ConnectLineBox_Width - 4, ypos1, 4, m_fheight, col2 /*, c_rad_small, CORNER_LEFT*/);//FIXME - m_frameBuffer->paintBoxRel(xpos + ConnectLineBox_Width - 3, ypos1, 8, m_fheight, col1 /*, c_rad_small, CORNER_LEFT*/); // item marker + m_frameBuffer->paintBoxRel(xpos + ConnectLineBox_Width - 4, ypos1, 4, m_fheight, col2, c_rad_small, CORNER_LEFT); + m_frameBuffer->paintBoxRel(xpos + ConnectLineBox_Width - 3, ypos1, 8, m_fheight, col1, c_rad_small, CORNER_LEFT); // item marker m_frameBuffer->paintBoxRel(xpos + ConnectLineBox_Width - 4, ypos2, 4, m_info_height, col1); diff --git a/src/gui/bedit/bouqueteditor_bouquets.cpp b/src/gui/bedit/bouqueteditor_bouquets.cpp index 797caf4c6..21a131e58 100644 --- a/src/gui/bedit/bouqueteditor_bouquets.cpp +++ b/src/gui/bedit/bouqueteditor_bouquets.cpp @@ -80,7 +80,7 @@ void CBEBouquetWidget::paintItem(int pos) color = COL_MENUCONTENTSELECTED; bgcolor = COL_MENUCONTENTSELECTED_PLUS_0; frameBuffer->paintBoxRel(x,ypos, width- 15, fheight, COL_MENUCONTENT_PLUS_0); - frameBuffer->paintBoxRel(x,ypos, width- 15, fheight, bgcolor, ROUND_RADIUS, 3); + frameBuffer->paintBoxRel(x,ypos, width- 15, fheight, bgcolor, ROUND_RADIUS); } else { bool has_channels = true; if(current < Bouquets->size()) @@ -127,7 +127,7 @@ void CBEBouquetWidget::paint() void CBEBouquetWidget::paintHead() { - frameBuffer->paintBoxRel(x,y, width,theight+0, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, 1); + frameBuffer->paintBoxRel(x,y, width,theight+0, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, CORNER_TOP); g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+10,y+theight+0, width, g_Locale->getText(LOCALE_BOUQUETLIST_HEAD), COL_MENUHEAD, 0, true); // UTF-8 } @@ -146,7 +146,7 @@ void CBEBouquetWidget::paintFoot() Button[2] = CBEBouquetWidgetButtons[2]; Button[3].button = NEUTRINO_ICON_BUTTON_BLUE; - frameBuffer->paintBoxRel(x,y+height, width,ButtonHeight, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, 2); + frameBuffer->paintBoxRel(x,y+height, width,ButtonHeight, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, CORNER_BOTTOM); //frameBuffer->paintHLine(x, x+width, y, COL_INFOBAR_SHADOW_PLUS_0); switch( blueFunction) diff --git a/src/gui/bedit/bouqueteditor_channels.cpp b/src/gui/bedit/bouqueteditor_channels.cpp index e0e48abe9..a60a4829f 100644 --- a/src/gui/bedit/bouqueteditor_channels.cpp +++ b/src/gui/bedit/bouqueteditor_channels.cpp @@ -81,7 +81,7 @@ void CBEChannelWidget::paintItem(int pos) color = COL_MENUCONTENTSELECTED; bgcolor = COL_MENUCONTENTSELECTED_PLUS_0; frameBuffer->paintBoxRel(x,ypos, width- 15, fheight, COL_MENUCONTENT_PLUS_0); - frameBuffer->paintBoxRel(x,ypos, width- 15, fheight, bgcolor, ROUND_RADIUS, 3); + frameBuffer->paintBoxRel(x,ypos, width- 15, fheight, bgcolor, ROUND_RADIUS); } else { color = COL_MENUCONTENT; bgcolor = COL_MENUCONTENT_PLUS_0; @@ -132,7 +132,7 @@ void CBEChannelWidget::paint() void CBEChannelWidget::paintHead() { - frameBuffer->paintBoxRel(x,y, width,theight+0, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, 1); + frameBuffer->paintBoxRel(x,y, width,theight+0, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, CORNER_TOP); g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+10,y+theight+0, width, caption.c_str() , COL_MENUHEAD, 0, true); } @@ -146,7 +146,7 @@ const struct button_label CBEChannelWidgetButtons[4] = void CBEChannelWidget::paintFoot() { - frameBuffer->paintBoxRel(x,y+height, width,ButtonHeight, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, 2); + frameBuffer->paintBoxRel(x,y+height, width,ButtonHeight, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, CORNER_BOTTOM); //frameBuffer->paintHLine(x, x+width, y, COL_INFOBAR_SHADOW_PLUS_0); ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + 10, y + height + 4, (width - 20) / 4, 4, CBEChannelWidgetButtons); diff --git a/src/gui/bedit/bouqueteditor_chanselect.cpp b/src/gui/bedit/bouqueteditor_chanselect.cpp index 663155f8f..3f3ce2ae1 100644 --- a/src/gui/bedit/bouqueteditor_chanselect.cpp +++ b/src/gui/bedit/bouqueteditor_chanselect.cpp @@ -96,7 +96,7 @@ void CBEChannelSelectWidget::paintItem(uint32_t itemNr, int paintNr, bool select color = COL_MENUCONTENTSELECTED; bgcolor = COL_MENUCONTENTSELECTED_PLUS_0; frameBuffer->paintBoxRel(x,ypos, width- 15, fheight, COL_MENUCONTENT_PLUS_0); - frameBuffer->paintBoxRel(x,ypos, width- 15, fheight, bgcolor, ROUND_RADIUS, 3); + frameBuffer->paintBoxRel(x,ypos, width- 15, fheight, bgcolor, ROUND_RADIUS); } else { @@ -165,7 +165,7 @@ int CBEChannelSelectWidget::exec(CMenuTarget* parent, const std::string & action void CBEChannelSelectWidget::paintFoot() { int ButtonWidth = width / 3; - frameBuffer->paintBoxRel(x,y+height, width,ButtonHeight, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, 2); + frameBuffer->paintBoxRel(x,y+height, width,ButtonHeight, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, CORNER_BOTTOM); //frameBuffer->paintHLine(x, x+width, y, COL_INFOBAR_SHADOW_PLUS_0); frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_OKAY, x+width- 3* ButtonWidth+ 8, y+height+1); diff --git a/src/gui/bouquetlist.cpp b/src/gui/bouquetlist.cpp index 11514d9b2..763faf8a9 100644 --- a/src/gui/bouquetlist.cpp +++ b/src/gui/bouquetlist.cpp @@ -468,7 +468,7 @@ void CBouquetList::paintItem(int pos) if (npos == (int) selected) { color = COL_MENUCONTENTSELECTED; bgcolor = COL_MENUCONTENTSELECTED_PLUS_0; - frameBuffer->paintBoxRel(x, ypos, width- 15, fheight, bgcolor, ROUND_RADIUS, 3); + frameBuffer->paintBoxRel(x, ypos, width- 15, fheight, bgcolor, ROUND_RADIUS); if(npos < (int) Bouquets.size()) CVFD::getInstance()->showMenuText(0, name, -1, true); } else { @@ -501,7 +501,7 @@ const struct button_label CBouquetListButtons[4] = void CBouquetList::paintHead() { - frameBuffer->paintBoxRel(x,y, width,theight+0, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, 1); + frameBuffer->paintBoxRel(x,y, width,theight+0, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, CORNER_TOP); g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+10,y+theight+0, width, name, COL_MENUHEAD, 0, true); // UTF-8 } @@ -522,12 +522,12 @@ void CBouquetList::paint() else // if(lastnum<100000) numwidth = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_NUMBER]->getRenderWidth("00000"); - //frameBuffer->paintBoxRel(x, y+theight, width, height-theight+10, COL_MENUCONTENT_PLUS_0, ROUND_RADIUS, 2); + //frameBuffer->paintBoxRel(x, y+theight, width, height-theight+10, COL_MENUCONTENT_PLUS_0, ROUND_RADIUS, CORNER_BOTTOM); frameBuffer->paintBoxRel(x, y+theight, width, height - theight - buttonHeight, COL_MENUCONTENT_PLUS_0); int ButtonWidth = (width - 20) / 4; - frameBuffer->paintBoxRel(x, y + (height - buttonHeight), width, buttonHeight - 1, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, 2); + frameBuffer->paintBoxRel(x, y + (height - buttonHeight), width, buttonHeight - 1, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, CORNER_BOTTOM); ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + 10, y + (height - buttonHeight) + 3, ButtonWidth, sizeof(CBouquetListButtons)/sizeof(CBouquetListButtons[0]), CBouquetListButtons); if(Bouquets.size()) diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index f73c5ada2..3d3740b9a 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -1275,7 +1275,7 @@ void CChannelList::paintDetails(int index) } else #endif { - frameBuffer->paintBoxRel(x+2, y + height + 2, width-4, info_height - 4, COL_MENUCONTENTDARK_PLUS_0, ROUND_RADIUS, 3);//round + frameBuffer->paintBoxRel(x+2, y + height + 2, width-4, info_height - 4, COL_MENUCONTENTDARK_PLUS_0, ROUND_RADIUS);//round if (!p_event->description.empty()) { char cNoch[50]; // UTF-8 @@ -1406,7 +1406,7 @@ void CChannelList::paintItem2DetailsLine (int pos, int ch_index) frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-16, ypos2a, 12,4, col1); frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-12, ypos2a, 8,1, col2); - frameBuffer->paintBoxRel(x, ypos2, width, info_height, col1, ROUND_RADIUS, 3); + frameBuffer->paintBoxRel(x, ypos2, width, info_height, col1, ROUND_RADIUS); } } } @@ -1430,11 +1430,11 @@ void CChannelList::paintItem(int pos) paintDetails(curr); frameBuffer->paintBoxRel(x + width - 100 - PIC_W, y+(theight-PIC_H)/2, PIC_W, PIC_H, COL_MENUHEAD_PLUS_0); g_PicViewer->DisplayLogo(chanlist[selected]->channel_id, x + width - 100 - PIC_W, y+(theight-PIC_H)/2, PIC_W, PIC_H); - frameBuffer->paintBoxRel(x,ypos, width- 15, fheight, bgcolor, ROUND_RADIUS, 3); + frameBuffer->paintBoxRel(x,ypos, width- 15, fheight, bgcolor, ROUND_RADIUS); } else { color = iscurrent ? COL_MENUCONTENT : COL_MENUCONTENTINACTIVE; bgcolor = iscurrent ? COL_MENUCONTENT_PLUS_0 : COL_MENUCONTENTINACTIVE_PLUS_0; - frameBuffer->paintBoxRel(x,ypos, width- 15, fheight, bgcolor, 0, 3); + frameBuffer->paintBoxRel(x,ypos, width- 15, fheight, bgcolor, 0); } #if 0 if(curr < chanlist.size()) { @@ -1590,7 +1590,7 @@ const struct button_label CChannelVListButtons[NUM_VLIST_BUTTONS] = void CChannelList::paintHead() { // head - frameBuffer->paintBoxRel(x,y, width,theight+0, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, 1);//round + frameBuffer->paintBoxRel(x,y, width,theight+0, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, CORNER_TOP);//round g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+10,y+theight+0, width- 65, name, COL_MENUHEAD, 0, true); // UTF-8 int ButtonWidth = (width - 20) / 4; @@ -1602,7 +1602,7 @@ void CChannelList::paintHead() CChannelListButtons[1].locale = LOCALE_INFOVIEWER_NEXT; } - frameBuffer->paintBoxRel(x, y + (height - buttonHeight), width, buttonHeight - 1, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, 2); //round + frameBuffer->paintBoxRel(x, y + (height - buttonHeight), width, buttonHeight - 1, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, CORNER_BOTTOM); //round ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + 10, y + (height - buttonHeight) + 3, ButtonWidth, vlist ? NUM_VLIST_BUTTONS : NUM_LIST_BUTTONS, vlist ? CChannelVListButtons : CChannelListButtons); @@ -1619,7 +1619,7 @@ void CChannelList::paint() numwidth = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_NUMBER]->getRenderWidth("0000"); //updateEvents(); - frameBuffer->paintBoxRel(x, y+theight, width, height-buttonHeight-theight, COL_MENUCONTENT_PLUS_0, 0, 2); + frameBuffer->paintBoxRel(x, y+theight, width, height-buttonHeight-theight, COL_MENUCONTENT_PLUS_0, 0, CORNER_BOTTOM); for(unsigned int count = 0; count < listmaxshow; count++) { paintItem(count); diff --git a/src/gui/dboxinfo.cpp b/src/gui/dboxinfo.cpp index 43e39fa8d..e68ec9182 100644 --- a/src/gui/dboxinfo.cpp +++ b/src/gui/dboxinfo.cpp @@ -94,9 +94,9 @@ void CDBoxInfoWidget::paint() { int ypos=y; int i = 0; - frameBuffer->paintBoxRel(x, ypos, width, hheight, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, 1); + frameBuffer->paintBoxRel(x, ypos, width, hheight, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, CORNER_TOP); g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+10, ypos+ hheight+1, width, "Uptime/Mem/Fs info", COL_MENUHEAD, 0, true); // UTF-8 - frameBuffer->paintBoxRel(x, ypos+ hheight, width, height- hheight, COL_MENUCONTENT_PLUS_0, ROUND_RADIUS, 2); + frameBuffer->paintBoxRel(x, ypos+ hheight, width, height- hheight, COL_MENUCONTENT_PLUS_0, ROUND_RADIUS, CORNER_BOTTOM); ypos+= hheight + (mheight >>1); diff --git a/src/gui/epgview.cpp b/src/gui/epgview.cpp index 312729e31..2c3a32fed 100644 --- a/src/gui/epgview.cpp +++ b/src/gui/epgview.cpp @@ -453,7 +453,7 @@ void CEpgData::showHead(const t_channel_id channel_id) frameBuffer->paintBackgroundBox (sx, sy- oldtoph- 1, sx+ ox, sy /*- toph*/); //show the epg title - frameBuffer->paintBoxRel(sx, sy- toph, ox, toph, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, 1);//round + frameBuffer->paintBoxRel(sx, sy- toph, ox, toph, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, CORNER_TOP);//round bool logo_ok = false; logo_ok = g_PicViewer->DisplayLogo(channel_id, sx+10, sy- toph+ (toph-PIC_H)/2/*5*/, PIC_W, PIC_H); @@ -1040,7 +1040,7 @@ void CEpgData::showTimerEventBar (bool show) // hide only? if (! show) return; - frameBuffer->paintBoxRel(x,y,w,h, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, 2);//round + frameBuffer->paintBoxRel(x,y,w,h, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, CORNER_BOTTOM);//round // Button: Timer Record & Channelswitch if (g_settings.recording_type != CNeutrinoApp::RECORDING_OFF) diff --git a/src/gui/eventlist.cpp b/src/gui/eventlist.cpp index 701d03221..60e74baa2 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -596,7 +596,7 @@ void EventList::paintItem(unsigned int pos, t_channel_id channel_id) bgcolor = COL_MENUCONTENT_PLUS_0; } - frameBuffer->paintBoxRel(x, ypos, width- 15, fheight, bgcolor, color == COL_MENUCONTENTSELECTED ? ROUND_RADIUS : 0, 3); + frameBuffer->paintBoxRel(x, ypos, width- 15, fheight, bgcolor, color == COL_MENUCONTENTSELECTED ? ROUND_RADIUS : 0); if(liststart+pospaintBoxRel(x,y, width,theight+0, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, 1); + frameBuffer->paintBoxRel(x,y, width,theight+0, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, CORNER_TOP); #ifndef FB_USE_PALETTE logo_ok = g_PicViewer->DisplayLogo(channel_id, x+10, y+(theight-PIC_H)/2, PIC_W, PIC_H); #endif @@ -682,7 +682,7 @@ void EventList::paint(t_channel_id channel_id) if (evtlist[0].eventID != 0) frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_HELP, x+ width- 30, y+ 5 ); - frameBuffer->paintBoxRel(x, y+theight, width, height-theight-iheight, COL_MENUCONTENT_PLUS_0, 0, 1); + frameBuffer->paintBoxRel(x, y+theight, width, height-theight-iheight, COL_MENUCONTENT_PLUS_0, 0, CORNER_TOP); for(unsigned int count=0;countpaintBoxRel(x,y,w,h, COL_INFOBAR_SHADOW_PLUS_1); //frameBuffer->paintBoxRel(bx,by,bw,bh, COL_MENUHEAD_PLUS_0); - frameBuffer->paintBoxRel(bx,by,bw,bh, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, 2); + frameBuffer->paintBoxRel(bx,by,bw,bh, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, CORNER_BOTTOM); // -- Button: Timer Record & Channelswitch diff --git a/src/gui/infoclock.cpp b/src/gui/infoclock.cpp index 2f9f11d9c..4c6033119 100644 --- a/src/gui/infoclock.cpp +++ b/src/gui/infoclock.cpp @@ -46,7 +46,7 @@ void CInfoClock::paintTime( bool show_dot) strftime((char*) ×tr, 20, "%H:%M:%S", localtime(&tm)); else strftime((char*) ×tr, 20, "%H.%M:%S", localtime(&tm)); - frameBuffer->paintBoxRel(x - time_width - 15, y, time_width, time_height, COL_MENUCONTENT_PLUS_0, 7, 3); + frameBuffer->paintBoxRel(x - time_width - 15, y, time_width, time_height, COL_MENUCONTENT_PLUS_0, 7); g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->RenderString(x - time_width- 10, y+ time_height, time_width, timestr, COL_MENUCONTENT); } diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index 93a66287a..47005aa99 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -84,7 +84,7 @@ extern t_channel_id live_channel_id; //zapit #define ICON_OFFSET (2 + ICON_LARGE_WIDTH + 2 + ICON_LARGE_WIDTH + 2 + ICON_SMALL_WIDTH + 2) #define BOTTOM_BAR_OFFSET 0 -#define SHADOW_OFFSET 6 +//#define SHADOW_OFFSET 6 #define borderwidth 4 #define LEFT_OFFSET 5 #define ASIZE 100 @@ -191,7 +191,7 @@ void CInfoViewer::paintTime (bool show_dot, bool firstPaint) strcpy (old_timestr, timestr); if (!firstPaint) { - frameBuffer->paintBoxRel (BoxEndX - time_width - LEFT_OFFSET, ChanNameY, time_width + LEFT_OFFSET, time_height, COL_INFOBAR_PLUS_0, ROUND_RADIUS, 1); + frameBuffer->paintBoxRel(BoxEndX - time_width - LEFT_OFFSET, ChanNameY, time_width + LEFT_OFFSET, time_height, COL_INFOBAR_PLUS_0, ROUND_RADIUS, CORNER_TOP); } timestr[2] = 0; @@ -310,15 +310,15 @@ void CInfoViewer::showTitle (const int ChanNum, const std::string & Channel, con asize = asize / 4; //Shadow - frameBuffer->paintBox (BoxEndX-20, ChanNameY + SHADOW_OFFSET, BoxEndX + SHADOW_OFFSET, BoxEndY, COL_INFOBAR_SHADOW_PLUS_0, ROUND_RADIUS, 1); - frameBuffer->paintBox (ChanInfoX + SHADOW_OFFSET, BoxEndY -20, BoxEndX + SHADOW_OFFSET, BoxEndY + SHADOW_OFFSET, COL_INFOBAR_SHADOW_PLUS_0, ROUND_RADIUS, 2); //round + frameBuffer->paintBox(BoxEndX-20, ChanNameY + SHADOW_OFFSET, BoxEndX + SHADOW_OFFSET, BoxEndY, COL_INFOBAR_SHADOW_PLUS_0, ROUND_RADIUS, CORNER_TOP); + frameBuffer->paintBox(ChanInfoX + SHADOW_OFFSET, BoxEndY -20, BoxEndX + SHADOW_OFFSET, BoxEndY + SHADOW_OFFSET, COL_INFOBAR_SHADOW_PLUS_0, ROUND_RADIUS, CORNER_BOTTOM); //round //infobox - frameBuffer->paintBoxRel (ChanNameX-10, ChanNameY, BoxEndX-ChanNameX+10, BoxEndInfoY-ChanNameY, COL_INFOBAR_PLUS_0, ROUND_RADIUS, 1); // round + frameBuffer->paintBoxRel(ChanNameX-10, ChanNameY, BoxEndX-ChanNameX+10, BoxEndInfoY-ChanNameY, COL_INFOBAR_PLUS_0, ROUND_RADIUS, CORNER_TOP); // round //number box - frameBuffer->paintBoxRel (BoxStartX + SHADOW_OFFSET, BoxStartY + SHADOW_OFFSET, ChanWidth, ChanHeight + 4, COL_INFOBAR_SHADOW_PLUS_0, ROUND_RADIUS, 3); // round - frameBuffer->paintBoxRel (BoxStartX, BoxStartY, ChanWidth, ChanHeight + 4, COL_INFOBAR_PLUS_0, ROUND_RADIUS, 3); // round + frameBuffer->paintBoxRel (BoxStartX + SHADOW_OFFSET, BoxStartY + SHADOW_OFFSET, ChanWidth, ChanHeight + 4, COL_INFOBAR_SHADOW_PLUS_0, ROUND_RADIUS); // round + frameBuffer->paintBoxRel (BoxStartX, BoxStartY, ChanWidth, ChanHeight + 4, COL_INFOBAR_PLUS_0, ROUND_RADIUS); // round int ChanNumYPos = BoxStartY + ChanHeight; if (g_settings.infobar_sat_display && satellitePosition != 0 && satellitePositions.size()) { @@ -377,7 +377,7 @@ void CInfoViewer::showTitle (const int ChanNum, const std::string & Channel, con frameBuffer->paintBoxRel (ChanInfoX + i*4, BoxEndInfoY + j*4, 2, 2, COL_INFOBAR_PLUS_1); } } - frameBuffer->paintBox (ChanInfoX, BoxEndY-20, BoxEndX, BoxEndY, COL_INFOBAR_BUTTONS_BACKGROUND, ROUND_RADIUS, 2); //round + frameBuffer->paintBox(ChanInfoX, BoxEndY-20, BoxEndX, BoxEndY, COL_INFOBAR_BUTTONS_BACKGROUND, ROUND_RADIUS, CORNER_BOTTOM); //round showSNR(); frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_BLUE, ChanInfoX + 16*3 + asize * 3 + 2*7, BoxEndY - ICON_Y_1); @@ -1067,8 +1067,8 @@ void CInfoViewer::show_Data (bool calledFromEvent) if (info_CurrentNext.flags & CSectionsdClient::epgflags::has_current) { //printf("CInfoViewer::show_Data: ************************************************* runningPercent %d\n", runningPercent); if(!calledFromEvent || (oldrunningPercent != runningPercent)) { - frameBuffer->paintBoxRel (BoxEndX - 104, posy + 6, 108, 14, COL_INFOBAR_SHADOW_PLUS_0, 1, 3); - frameBuffer->paintBoxRel (BoxEndX - 108, posy + 2, 108, 14, COL_INFOBAR_PLUS_0, 1, 3); + frameBuffer->paintBoxRel(BoxEndX - 104, posy + 6, 108, 14, COL_INFOBAR_SHADOW_PLUS_0, 1); + frameBuffer->paintBoxRel(BoxEndX - 108, posy + 2, 108, 14, COL_INFOBAR_PLUS_0, 1); oldrunningPercent = runningPercent; } timescale->paint(BoxEndX - 102, posy + 2, runningPercent); diff --git a/src/gui/motorcontrol.cpp b/src/gui/motorcontrol.cpp index 34510f9c5..778d687d3 100644 --- a/src/gui/motorcontrol.cpp +++ b/src/gui/motorcontrol.cpp @@ -537,9 +537,9 @@ void CMotorControl::paintStatus() void CMotorControl::paint() { ypos = y; - frameBuffer->paintBoxRel(x, ypos, width, hheight, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, 1); + frameBuffer->paintBoxRel(x, ypos, width, hheight, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, CORNER_TOP); g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x + 10, ypos + hheight, width, (char *) g_Locale->getText(LOCALE_MOTORCONTROL_HEAD), COL_MENUHEAD, 0, true); // UTF-8 - frameBuffer->paintBoxRel(x, ypos + hheight, width, height - hheight, COL_MENUCONTENT_PLUS_0, ROUND_RADIUS, 2); + frameBuffer->paintBoxRel(x, ypos + hheight, width, height - hheight, COL_MENUCONTENT_PLUS_0, ROUND_RADIUS, CORNER_BOTTOM); ypos += hheight + (mheight >> 1) - 10; ypos_menue = ypos; diff --git a/src/gui/moviebrowser.cpp b/src/gui/moviebrowser.cpp index b9a5392f7..5c6fe8107 100644 --- a/src/gui/moviebrowser.cpp +++ b/src/gui/moviebrowser.cpp @@ -1492,7 +1492,7 @@ void CMovieBrowser::refreshTitle(void) //Paint Text Background //TRACE("[mb]->refreshTitle : %s\r\n",m_textTitle.c_str()); m_pcWindow->paintBoxRel(m_cBoxFrame.iX+m_cBoxFrameTitleRel.iX, m_cBoxFrame.iY+ m_cBoxFrameTitleRel.iY, - m_cBoxFrameTitleRel.iWidth, m_cBoxFrameTitleRel.iHeight, TITLE_BACKGROUND_COLOR, ROUND_RADIUS, 1); + m_cBoxFrameTitleRel.iWidth, m_cBoxFrameTitleRel.iHeight, TITLE_BACKGROUND_COLOR, ROUND_RADIUS, CORNER_TOP); m_pcFontTitle->RenderString(m_cBoxFrame.iX+m_cBoxFrameTitleRel.iX + TEXT_BORDER_WIDTH, m_cBoxFrame.iY+m_cBoxFrameTitleRel.iY + m_cBoxFrameTitleRel.iHeight, m_cBoxFrameTitleRel.iWidth - (TEXT_BORDER_WIDTH << 1), m_textTitle.c_str(), TITLE_FONT_COLOR, 0, true); // UTF-8 } @@ -1512,7 +1512,7 @@ void CMovieBrowser::refreshFoot(void) // draw the background first m_pcWindow->paintBoxRel(m_cBoxFrame.iX+m_cBoxFrameFootRel.iX, m_cBoxFrame.iY+ m_cBoxFrameFootRel.iY, m_cBoxFrameFootRel.iWidth, m_cBoxFrameFootRel.iHeight+ 6, - (CFBWindow::color_t)COL_MENUHEAD_PLUS_0, ROUND_RADIUS, 2); + (CFBWindow::color_t)COL_MENUHEAD_PLUS_0, ROUND_RADIUS, CORNER_BOTTOM); int width = m_cBoxFrameFootRel.iWidth>>2; diff --git a/src/gui/pictureviewer.cpp b/src/gui/pictureviewer.cpp index 71129b028..f4470a890 100644 --- a/src/gui/pictureviewer.cpp +++ b/src/gui/pictureviewer.cpp @@ -551,7 +551,7 @@ void CPictureViewerGui::paintItem(int pos) bgcolor = COL_MENUCONTENTSELECTED_PLUS_0; } - frameBuffer->paintBoxRel(x,ypos, width-15, fheight, bgcolor, liststart+pos == selected ? ROUND_RADIUS : 0, 3); + frameBuffer->paintBoxRel(x, ypos, width-15, fheight, bgcolor, liststart+pos == selected ? ROUND_RADIUS : 0); if(liststart+posgetText(LOCALE_PICTUREVIEWER_HEAD); - frameBuffer->paintBoxRel(x,y, width,theight, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, 1); + frameBuffer->paintBoxRel(x, y, width, theight, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, CORNER_TOP); frameBuffer->paintIcon("mp3.raw",x+7,y+10); g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+35,y+theight+0, width- 45, strCaption, COL_MENUHEAD, 0, true); // UTF-8 int ypos=y+0; @@ -599,7 +599,7 @@ void CPictureViewerGui::paintFoot() // printf("paintFoot{\n"); int ButtonWidth = (width-20) / 4; int ButtonWidth2 = (width-50) / 2; - frameBuffer->paintBoxRel(x,y+(height-2*buttonHeight), width,2*buttonHeight, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, 2); + frameBuffer->paintBoxRel(x, y+(height-2*buttonHeight), width, 2*buttonHeight, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, CORNER_BOTTOM); frameBuffer->paintHLine(x, x+width, y+(height-2*buttonHeight), COL_INFOBAR_SHADOW_PLUS_0); if (!playlist.empty()) diff --git a/src/gui/scan.cpp b/src/gui/scan.cpp index 93cb3218c..36d2d4a13 100644 --- a/src/gui/scan.cpp +++ b/src/gui/scan.cpp @@ -248,7 +248,7 @@ int CScanTs::exec(CMenuTarget* parent, const std::string & actionKey) const char * text = g_Locale->getText(success ? LOCALE_SCANTS_FINISHED : LOCALE_SCANTS_FAILED); //paintLine(xpos2, ypos_frequency, xpos_frequency, text); - frameBuffer->paintBoxRel(x, y, width, hheight, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, 1); + frameBuffer->paintBoxRel(x, y, width, hheight, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, CORNER_TOP); g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(xpos1, y + hheight, width, text, COL_MENUHEAD, 0, true); // UTF-8 unsigned long long timeoutEnd = CRCInput::calcTimeoutEnd(0xFFFF); do { @@ -405,10 +405,10 @@ void CScanTs::paint(bool fortest) ypos = y; //frameBuffer->paintBoxRel(x, ypos, width, hheight, COL_MENUHEAD_PLUS_0); - frameBuffer->paintBoxRel(x, ypos, width, hheight, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, 1); + frameBuffer->paintBoxRel(x, ypos, width, hheight, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, CORNER_TOP); g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(xpos1, ypos + hheight, width, fortest ? g_Locale->getText(LOCALE_SCANTS_TEST) : g_Locale->getText(LOCALE_SCANTS_HEAD), COL_MENUHEAD, 0, true); // UTF-8 //frameBuffer->paintBoxRel(x, ypos + hheight, width, height - hheight, COL_MENUCONTENT_PLUS_0); - frameBuffer->paintBoxRel(x, ypos + hheight, width, height - hheight, COL_MENUCONTENT_PLUS_0, ROUND_RADIUS, 2); + frameBuffer->paintBoxRel(x, ypos + hheight, width, height - hheight, COL_MENUCONTENT_PLUS_0, ROUND_RADIUS, CORNER_BOTTOM); frameBuffer->loadPal("radar.pal", 17, 37); diff --git a/src/gui/timerlist.cpp b/src/gui/timerlist.cpp index e26c3ed40..3b4ee7943 100644 --- a/src/gui/timerlist.cpp +++ b/src/gui/timerlist.cpp @@ -742,7 +742,7 @@ void CTimerList::paintItem(int pos) void CTimerList::paintHead() { - frameBuffer->paintBoxRel(x,y, width,theight+0, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, 1); + frameBuffer->paintBoxRel(x, y, width, theight, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, CORNER_TOP); frameBuffer->paintIcon("timer.raw",x+5,y+4); g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+35,y+theight+0, width- 45, g_Locale->getText(LOCALE_TIMERLIST_NAME), COL_MENUHEAD, 0, true); // UTF-8 @@ -761,7 +761,7 @@ const struct button_label TimerListButtons[3] = void CTimerList::paintFoot() { int ButtonWidth = (width - 20) / 4; - frameBuffer->paintBoxRel(x,y+height, width,buttonHeight, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, 2); + frameBuffer->paintBoxRel(x, y+height, width, buttonHeight, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, CORNER_BOTTOM); //frameBuffer->paintHLine(x, x+width, y, COL_INFOBAR_SHADOW_PLUS_0); if (timerlist.empty()) diff --git a/src/gui/widget/colorchooser.cpp b/src/gui/widget/colorchooser.cpp index 5065a05d7..5ee4c85e9 100644 --- a/src/gui/widget/colorchooser.cpp +++ b/src/gui/widget/colorchooser.cpp @@ -231,10 +231,10 @@ void CColorChooser::hide() void CColorChooser::paint() { //frameBuffer->paintBoxRel(x,y, width,hheight, COL_MENUHEAD_PLUS_0); - frameBuffer->paintBoxRel(x,y, width,hheight, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, 1); //round + frameBuffer->paintBoxRel(x,y, width,hheight, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, CORNER_TOP); //round g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+10,y+hheight, width, g_Locale->getText(name), COL_MENUHEAD, 0, true); // UTF-8 //frameBuffer->paintBoxRel(x,y+hheight, width,height-hheight, COL_MENUCONTENT_PLUS_0); - frameBuffer->paintBoxRel(x,y+hheight, width,height-hheight, COL_MENUCONTENT_PLUS_0, ROUND_RADIUS, 2);//round + frameBuffer->paintBoxRel(x,y+hheight, width,height-hheight, COL_MENUCONTENT_PLUS_0, ROUND_RADIUS, CORNER_BOTTOM);//round for (int i = 0; i < 4; i++) paintSlider(x + 10, y + hheight + mheight * i, value[i], colorchooser_names[i], iconnames[i], (i == 0)); diff --git a/src/gui/widget/hintbox.cpp b/src/gui/widget/hintbox.cpp index b20e4afa7..aefa35e88 100644 --- a/src/gui/widget/hintbox.cpp +++ b/src/gui/widget/hintbox.cpp @@ -154,11 +154,11 @@ void CHintBox::refresh(void) //window->paintBoxRel(borderwidth, height, width, borderwidth, COL_INFOBAR_SHADOW_PLUS_0); //window->paintBoxRel(width, borderwidth, borderwidth, height - borderwidth, COL_INFOBAR_SHADOW_PLUS_0); - window->paintBoxRel(width-20, borderwidth, borderwidth+20, height - borderwidth, COL_INFOBAR_SHADOW_PLUS_0, ROUND_RADIUS, 1); // right - window->paintBoxRel(borderwidth, height-20, width, borderwidth+20, COL_INFOBAR_SHADOW_PLUS_0, ROUND_RADIUS, 2); // bottom + window->paintBoxRel(width-20, borderwidth, borderwidth+20, height - borderwidth, COL_INFOBAR_SHADOW_PLUS_0, ROUND_RADIUS, CORNER_TOP); // right + window->paintBoxRel(borderwidth, height-20, width, borderwidth+20, COL_INFOBAR_SHADOW_PLUS_0, ROUND_RADIUS, CORNER_BOTTOM); // bottom //window->paintBoxRel(0, 0, width, theight, (CFBWindow::color_t)COL_MENUHEAD_PLUS_0); - window->paintBoxRel(0, 0, width, theight, (CFBWindow::color_t)COL_MENUHEAD_PLUS_0, ROUND_RADIUS, 1);//round + window->paintBoxRel(0, 0, width, theight, (CFBWindow::color_t)COL_MENUHEAD_PLUS_0, ROUND_RADIUS, CORNER_TOP);//round if (!iconfile.empty()) { @@ -169,7 +169,7 @@ void CHintBox::refresh(void) 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); - window->paintBoxRel(0, theight, width, (entries_per_page + 1) * fheight, (CFBWindow::color_t)COL_MENUCONTENT_PLUS_0, ROUND_RADIUS, 2);//round + window->paintBoxRel(0, theight, width, (entries_per_page + 1) * fheight, (CFBWindow::color_t)COL_MENUCONTENT_PLUS_0, ROUND_RADIUS, CORNER_BOTTOM);//round int count = entries_per_page; int ypos = theight + (fheight >> 1); diff --git a/src/gui/widget/keychooser.cpp b/src/gui/widget/keychooser.cpp index 4aee5ef17..c3b4de631 100644 --- a/src/gui/widget/keychooser.cpp +++ b/src/gui/widget/keychooser.cpp @@ -158,8 +158,8 @@ void CKeyChooserItem::paint() //frameBuffer->paintBoxRel(x, y , width, hheight , COL_MENUHEAD_PLUS_0 ); //frameBuffer->paintBoxRel(x, y + hheight, width, height - hheight, COL_MENUCONTENT_PLUS_0); - frameBuffer->paintBoxRel(x, y , width, hheight , COL_MENUHEAD_PLUS_0 , ROUND_RADIUS, 1);//round - frameBuffer->paintBoxRel(x, y + hheight, width, height - hheight, COL_MENUCONTENT_PLUS_0, ROUND_RADIUS, 2);//round + frameBuffer->paintBoxRel(x, y , width, hheight , COL_MENUHEAD_PLUS_0 , ROUND_RADIUS, CORNER_TOP);//round + frameBuffer->paintBoxRel(x, y + hheight, width, height - hheight, COL_MENUCONTENT_PLUS_0, ROUND_RADIUS, CORNER_BOTTOM);//round g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+ 10, y+ hheight, width, g_Locale->getText(name), COL_MENUHEAD, 0, true); // UTF-8 diff --git a/src/gui/widget/lcdcontroler.cpp b/src/gui/widget/lcdcontroler.cpp index 8b9b23ce6..8f66e8707 100644 --- a/src/gui/widget/lcdcontroler.cpp +++ b/src/gui/widget/lcdcontroler.cpp @@ -307,8 +307,8 @@ void CLcdControler::paint() //frameBuffer->paintBoxRel(x,y, width,hheight, COL_MENUHEAD_PLUS_0); //frameBuffer->paintBoxRel(x,y+hheight, width,height-hheight, COL_MENUCONTENT_PLUS_0); - frameBuffer->paintBoxRel(x,y, width,hheight, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, 1);//round - frameBuffer->paintBoxRel(x,y+hheight, width,height-hheight, COL_MENUCONTENT_PLUS_0, ROUND_RADIUS, 2);//round + frameBuffer->paintBoxRel(x,y, width,hheight, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, CORNER_TOP);//round + frameBuffer->paintBoxRel(x,y+hheight, width,height-hheight, COL_MENUCONTENT_PLUS_0, ROUND_RADIUS, CORNER_BOTTOM);//round g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+10,y+hheight, width, g_Locale->getText(name), COL_MENUHEAD, 0, true); // UTF-8 diff --git a/src/gui/widget/listbox.cpp b/src/gui/widget/listbox.cpp index 93d5162b5..516243cb2 100644 --- a/src/gui/widget/listbox.cpp +++ b/src/gui/widget/listbox.cpp @@ -80,7 +80,7 @@ void CListBox::paint() void CListBox::paintHead() { //frameBuffer->paintBoxRel(x,y, width,theight+0, COL_MENUHEAD_PLUS_0); - frameBuffer->paintBoxRel(x,y, width,theight+0, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, 1);//round + frameBuffer->paintBoxRel(x, y, width, theight+0, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, CORNER_TOP);//round g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+10,y+theight+0, width, caption.c_str() , COL_MENUHEAD, 0, true); } @@ -88,7 +88,7 @@ void CListBox::paintFoot() { int ButtonWidth = width / 4; //frameBuffer->paintBoxRel(x,y+height, width,ButtonHeight, COL_MENUHEAD_PLUS_0); - frameBuffer->paintBoxRel(x,y+height, width,ButtonHeight, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, 2);//round + frameBuffer->paintBoxRel(x, y+height, width, ButtonHeight, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, CORNER_BOTTOM);//round frameBuffer->paintHLine(x, x+width, y, COL_INFOBAR_SHADOW_PLUS_0); frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_OKAY, x+width- 4* ButtonWidth+ 8, y+height+1); diff --git a/src/gui/widget/listframe.cpp b/src/gui/widget/listframe.cpp index 5130c43e0..78ac063a9 100644 --- a/src/gui/widget/listframe.cpp +++ b/src/gui/widget/listframe.cpp @@ -412,7 +412,7 @@ void CListFrame::refreshList(void) frameBuffer->paintBoxRel(m_cFrameListRel.iX+m_cFrame.iX, y+m_cFrame.iY, m_cFrameListRel.iWidth, m_nFontListHeight, LIST_BACKGROUND_COLOR_SELECTED, - ROUND_RADIUS, 3); + ROUND_RADIUS); } int width; int x = m_cFrameListRel.iX + TEXT_BORDER_WIDTH; @@ -450,7 +450,7 @@ void CListFrame::refreshLine(int line) color = LIST_FONT_COLOR_SELECTED; frameBuffer->paintBoxRel(m_cFrameListRel.iX+m_cFrame.iX, y+m_cFrame.iY, m_cFrameListRel.iWidth, m_nFontListHeight, LIST_BACKGROUND_COLOR_SELECTED, - ROUND_RADIUS, 3); + ROUND_RADIUS); } else { diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index 983b77dec..99c69e9d6 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -487,7 +487,7 @@ void CMenuWidget::paint() 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, ROUND_RADIUS, 1); //FIXME rounded + frameBuffer->paintBoxRel(x, y, width+sb_width, hheight, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, CORNER_TOP); //FIXME rounded 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); @@ -514,12 +514,12 @@ void CMenuWidget::paintItems() { int sbh= ((item_height-4) / total_pages); // items box - frameBuffer->paintBoxRel(x,item_start_y, width+15,item_height+10, COL_MENUCONTENT_PLUS_0, ROUND_RADIUS, 2); + frameBuffer->paintBoxRel(x, item_start_y, width+15, item_height+10, COL_MENUCONTENT_PLUS_0, ROUND_RADIUS, CORNER_BOTTOM); // scrollbar frameBuffer->paintBoxRel(x+ width,item_start_y, 15, item_height, COL_MENUCONTENT_PLUS_1); frameBuffer->paintBoxRel(x+ width +2, item_start_y+ 2+ current_page* sbh, 11, sbh, COL_MENUCONTENT_PLUS_3); } else - frameBuffer->paintBoxRel(x,item_start_y, width,item_height, COL_MENUCONTENT_PLUS_0, ROUND_RADIUS, 2);//FIXME round + frameBuffer->paintBoxRel(x, item_start_y, width,item_height, COL_MENUCONTENT_PLUS_0, ROUND_RADIUS, CORNER_BOTTOM);//FIXME round int ypos=item_start_y; for (unsigned int count = 0; count < items.size(); count++) { @@ -600,9 +600,9 @@ int CMenuOptionNumberChooser::paint(bool selected, bool last) } if(selected) - frameBuffer->paintBoxRel(x, y, dx, height, bgcolor, ROUND_RADIUS, 3); //FIXME + frameBuffer->paintBoxRel(x, y, dx, height, bgcolor, ROUND_RADIUS); //FIXME else if(last) - frameBuffer->paintBoxRel(x, y, dx, height, bgcolor, ROUND_RADIUS, 2); //FIXME + frameBuffer->paintBoxRel(x, y, dx, height, bgcolor, ROUND_RADIUS, CORNER_BOTTOM); //FIXME else frameBuffer->paintBoxRel(x, y, dx, height, bgcolor); @@ -754,9 +754,9 @@ int CMenuOptionChooser::paint( bool selected , bool last) } if(selected) - frameBuffer->paintBoxRel(x, y, dx, height, bgcolor, ROUND_RADIUS, 3); //FIXME + frameBuffer->paintBoxRel(x, y, dx, height, bgcolor, ROUND_RADIUS); //FIXME else if(last) - frameBuffer->paintBoxRel(x, y, dx, height, bgcolor, ROUND_RADIUS, 2); //FIXME + frameBuffer->paintBoxRel(x, y, dx, height, bgcolor, ROUND_RADIUS, CORNER_BOTTOM); //FIXME else frameBuffer->paintBoxRel(x, y, dx, height, bgcolor); @@ -915,9 +915,9 @@ int CMenuOptionStringChooser::paint( bool selected, bool last ) } if(selected) - CFrameBuffer::getInstance()->paintBoxRel(x, y, dx, height, bgcolor, ROUND_RADIUS, 3); //FIXME + CFrameBuffer::getInstance()->paintBoxRel(x, y, dx, height, bgcolor, ROUND_RADIUS); //FIXME else if(last) - CFrameBuffer::getInstance()->paintBoxRel(x, y, dx, height, bgcolor, ROUND_RADIUS, 2); //FIXME + CFrameBuffer::getInstance()->paintBoxRel(x, y, dx, height, bgcolor, ROUND_RADIUS, CORNER_BOTTOM); //FIXME else CFrameBuffer::getInstance()->paintBoxRel(x, y, dx, height, bgcolor); @@ -1013,9 +1013,9 @@ int CMenuOptionLanguageChooser::paint( bool selected, bool last ) } if(selected) - CFrameBuffer::getInstance()->paintBoxRel(x, y, dx, height, bgcolor, ROUND_RADIUS, 3); //FIXME + CFrameBuffer::getInstance()->paintBoxRel(x, y, dx, height, bgcolor, ROUND_RADIUS); //FIXME else if(last) - CFrameBuffer::getInstance()->paintBoxRel(x, y, dx, height, bgcolor, ROUND_RADIUS, 2); //FIXME + CFrameBuffer::getInstance()->paintBoxRel(x, y, dx, height, bgcolor, ROUND_RADIUS, CORNER_BOTTOM); //FIXME else CFrameBuffer::getInstance()->paintBoxRel(x, y, dx, height, bgcolor); @@ -1147,9 +1147,9 @@ int CMenuForwarder::paint(bool selected, bool last) } if(selected) - frameBuffer->paintBoxRel(x, y, dx, height, bgcolor, ROUND_RADIUS, 3); //FIXME + frameBuffer->paintBoxRel(x, y, dx, height, bgcolor, ROUND_RADIUS); //FIXME else if(last) - frameBuffer->paintBoxRel(x, y, dx, height, bgcolor, ROUND_RADIUS, 2); //FIXME + frameBuffer->paintBoxRel(x, y, dx, height, bgcolor, ROUND_RADIUS, CORNER_BOTTOM); //FIXME else frameBuffer->paintBoxRel(x, y, dx, height, bgcolor); g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(stringstartposX, y+ height, dx- (stringstartposX - x), l_text, color, 0, true); // UTF-8 diff --git a/src/gui/widget/messagebox.cpp b/src/gui/widget/messagebox.cpp index d08d8de7b..560dca393 100644 --- a/src/gui/widget/messagebox.cpp +++ b/src/gui/widget/messagebox.cpp @@ -100,7 +100,7 @@ void CMessageBox::paintButtons() 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, ROUND_RADIUS, 2); + m_window->paintBoxRel(0, m_height - (m_fheight << 1), m_width, (m_fheight << 1), (CFBWindow::color_t)COL_MENUCONTENT_PLUS_0, ROUND_RADIUS, CORNER_BOTTOM); //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 @@ -128,7 +128,7 @@ void CMessageBox::paintButtons() 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, ROUND_RADIUS, 3);//round + m_window->paintBoxRel(xpos, m_height - m_fheight - 20, ButtonWidth, m_fheight, (CFBWindow::color_t)bgcolor, ROUND_RADIUS);//round 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 xpos += ButtonWidth + ButtonSpacing; @@ -149,7 +149,7 @@ void CMessageBox::paintButtons() } //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, ROUND_RADIUS, 3);//round + m_window->paintBoxRel(xpos, m_height-m_fheight-20, ButtonWidth, m_fheight, (CFBWindow::color_t)bgcolor, ROUND_RADIUS);//round 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 xpos += ButtonWidth + ButtonSpacing; @@ -170,7 +170,7 @@ void CMessageBox::paintButtons() } //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, ROUND_RADIUS, 3);//round + m_window->paintBoxRel(xpos, m_height-m_fheight-20, ButtonWidth, m_fheight, (CFBWindow::color_t)bgcolor, ROUND_RADIUS);//round 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 } diff --git a/src/gui/widget/progresswindow.cpp b/src/gui/widget/progresswindow.cpp index 24679f154..a66a2696f 100644 --- a/src/gui/widget/progresswindow.cpp +++ b/src/gui/widget/progresswindow.cpp @@ -144,10 +144,10 @@ void CProgressWindow::hide() void CProgressWindow::paint() { int ypos=y; - frameBuffer->paintBoxRel(x, ypos, width, hheight, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, 1); + frameBuffer->paintBoxRel(x, ypos, width, hheight, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, CORNER_TOP); if (caption != NONEXISTANT_LOCALE) g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+10, ypos+ hheight, width- 10, g_Locale->getText(caption), COL_MENUHEAD, 0, true); // UTF-8 - frameBuffer->paintBoxRel(x, ypos+ hheight, width, height- hheight, COL_MENUCONTENT_PLUS_0, ROUND_RADIUS, 2); + frameBuffer->paintBoxRel(x, ypos+ hheight, width, height- hheight, COL_MENUCONTENT_PLUS_0, ROUND_RADIUS, CORNER_BOTTOM); ypos+= hheight + (mheight >>1); statusTextY = ypos+mheight; diff --git a/src/gui/widget/stringinput.cpp b/src/gui/widget/stringinput.cpp index 947bd6da3..52aa48622 100644 --- a/src/gui/widget/stringinput.cpp +++ b/src/gui/widget/stringinput.cpp @@ -471,8 +471,8 @@ void CStringInput::paint() //frameBuffer->paintBoxRel(x, y, width, hheight, COL_MENUHEAD_PLUS_0); //frameBuffer->paintBoxRel(x, y + hheight, width, height - hheight, COL_MENUCONTENT_PLUS_0); - frameBuffer->paintBoxRel(x, y, width, hheight, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, 1); //round - frameBuffer->paintBoxRel(x, y + hheight, width, height - hheight, COL_MENUCONTENT_PLUS_0, ROUND_RADIUS, 2);//round + frameBuffer->paintBoxRel(x, y, width, hheight, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, CORNER_TOP); //round + frameBuffer->paintBoxRel(x, y + hheight, width, height - hheight, COL_MENUCONTENT_PLUS_0, ROUND_RADIUS, CORNER_BOTTOM);//round if (!(iconfile.empty())) { @@ -685,7 +685,7 @@ void CStringInputSMS::paint() frameBuffer->paintIcon("numericpad.raw", x+20+140, y+ hheight+ mheight+ iheight* 3+ 30, COL_MENUCONTENT); - frameBuffer->paintBoxRel(x,y+height-25, width,25, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, 2); + frameBuffer->paintBoxRel(x,y+height-25, width,25, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, CORNER_BOTTOM); frameBuffer->paintHLine(x, x+width, y+height-25, COL_INFOBAR_SHADOW_PLUS_0); ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + 8, y+height-25+1, 230, 2, CStringInputSMSButtons); diff --git a/src/gui/widget/stringinput_ext.cpp b/src/gui/widget/stringinput_ext.cpp index 4e294c31d..7e4086664 100644 --- a/src/gui/widget/stringinput_ext.cpp +++ b/src/gui/widget/stringinput_ext.cpp @@ -278,8 +278,8 @@ void CExtendedInput::hide() void CExtendedInput::paint() { - frameBuffer->paintBoxRel(x, y, width, hheight, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, 1); - frameBuffer->paintBoxRel(x, y + hheight, width, height - hheight, COL_MENUCONTENT_PLUS_0, ROUND_RADIUS, 2); + frameBuffer->paintBoxRel(x, y, width, hheight, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, CORNER_TOP); + frameBuffer->paintBoxRel(x, y + hheight, width, height - hheight, COL_MENUCONTENT_PLUS_0, ROUND_RADIUS, CORNER_BOTTOM); g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+ 10, y+ hheight, width- 10, g_Locale->getText(name), COL_MENUHEAD, 0, true); // UTF-8 diff --git a/src/gui/widget/vfdcontroler.cpp b/src/gui/widget/vfdcontroler.cpp index f0a75a797..3f7456437 100644 --- a/src/gui/widget/vfdcontroler.cpp +++ b/src/gui/widget/vfdcontroler.cpp @@ -121,7 +121,7 @@ int CVfdControler::exec(CMenuTarget* parent, const std::string &) CVFD::getInstance()->setMode(CVFD::MODE_STANDBY); break; case 2: - frameBuffer->paintBoxRel(x, y+hheight+mheight*2+mheight/2, width, mheight, COL_MENUCONTENTSELECTED_PLUS_0, ROUND_RADIUS, 3); + frameBuffer->paintBoxRel(x, y+hheight+mheight*2+mheight/2, width, mheight, COL_MENUCONTENTSELECTED_PLUS_0, ROUND_RADIUS); g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+10, y+hheight+mheight*3+mheight/2, width, g_Locale->getText(LOCALE_OPTIONS_DEFAULT), COL_MENUCONTENTSELECTED, 0, true); // UTF-8 break; } @@ -141,7 +141,7 @@ int CVfdControler::exec(CMenuTarget* parent, const std::string &) case 1: paintSlider(x+10, y+hheight+mheight, brightnessstandby, BRIGHTNESSFACTOR, LOCALE_LCDCONTROLER_BRIGHTNESSSTANDBY, true); CVFD::getInstance()->setMode(CVFD::MODE_STANDBY); - frameBuffer->paintBoxRel(x, y+hheight+mheight*2+mheight/2, width, mheight, COL_MENUCONTENT_PLUS_0, ROUND_RADIUS, 2); + frameBuffer->paintBoxRel(x, y+hheight+mheight*2+mheight/2, width, mheight, COL_MENUCONTENT_PLUS_0, ROUND_RADIUS, CORNER_BOTTOM); g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+10, y+hheight+mheight*3+mheight/2, width, g_Locale->getText(LOCALE_OPTIONS_DEFAULT), COL_MENUCONTENT, 0, true); // UTF-8 break; case 2: @@ -242,8 +242,8 @@ void CVfdControler::paint() { CVFD::getInstance()->setMode(CVFD::MODE_TVRADIO); - frameBuffer->paintBoxRel(x,y, width,hheight, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, 1);//round - frameBuffer->paintBoxRel(x,y+hheight, width,height-hheight, COL_MENUCONTENT_PLUS_0, ROUND_RADIUS, 2);//round + frameBuffer->paintBoxRel(x, y, width, hheight, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, CORNER_TOP);//round + frameBuffer->paintBoxRel(x, y+hheight, width, height-hheight, COL_MENUCONTENT_PLUS_0, ROUND_RADIUS, CORNER_BOTTOM);//round g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+10,y+hheight, width, g_Locale->getText(name), COL_MENUHEAD, 0, true); // UTF-8