mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 23:42:58 +02:00
*menu: hide detail line objects without paintBackgroundBoxRel()
This commit is contained in:
@@ -35,7 +35,7 @@
|
|||||||
#include <driver/screen_max.h>
|
#include <driver/screen_max.h>
|
||||||
|
|
||||||
#include <gui/widget/stringinput.h>
|
#include <gui/widget/stringinput.h>
|
||||||
#include <gui/widget/components.h>
|
|
||||||
#include <global.h>
|
#include <global.h>
|
||||||
#include <neutrino.h>
|
#include <neutrino.h>
|
||||||
#include <neutrino_menue.h>
|
#include <neutrino_menue.h>
|
||||||
@@ -323,6 +323,7 @@ void CMenuWidget::Init(const std::string & Icon, const int mwidth, const mn_widg
|
|||||||
mglobal = CMenuGlobal::getInstance(); //create CMenuGlobal instance only here
|
mglobal = CMenuGlobal::getInstance(); //create CMenuGlobal instance only here
|
||||||
frameBuffer = CFrameBuffer::getInstance();
|
frameBuffer = CFrameBuffer::getInstance();
|
||||||
iconfile = Icon;
|
iconfile = Icon;
|
||||||
|
details_line = NULL;
|
||||||
|
|
||||||
//handle select values
|
//handle select values
|
||||||
if(w_index > MN_WIDGET_ID_MAX){
|
if(w_index > MN_WIDGET_ID_MAX){
|
||||||
@@ -391,6 +392,7 @@ CMenuWidget::~CMenuWidget()
|
|||||||
page_start.clear();
|
page_start.clear();
|
||||||
#endif
|
#endif
|
||||||
resetWidget(true);
|
resetWidget(true);
|
||||||
|
delete details_line;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMenuWidget::addItem(CMenuItem* menuItem, const bool defaultselected)
|
void CMenuWidget::addItem(CMenuItem* menuItem, const bool defaultselected)
|
||||||
@@ -1076,8 +1078,9 @@ void CMenuWidget::paintHint(int pos)
|
|||||||
int iwidth = width+sb_width;
|
int iwidth = width+sb_width;
|
||||||
|
|
||||||
if (hint_painted) {
|
if (hint_painted) {
|
||||||
/* clear line box */
|
/* clear detailsline line */
|
||||||
frameBuffer->paintBackgroundBoxRel(xpos, y+SHADOW_OFFSET, ConnectLineBox_Width, height+hint_height+rad);
|
if (details_line != NULL)
|
||||||
|
details_line->hide();
|
||||||
/* clear info box */
|
/* clear info box */
|
||||||
frameBuffer->paintBackgroundBoxRel(x, ypos2, iwidth+SHADOW_OFFSET, hint_height+SHADOW_OFFSET);
|
frameBuffer->paintBackgroundBoxRel(x, ypos2, iwidth+SHADOW_OFFSET, hint_height+SHADOW_OFFSET);
|
||||||
|
|
||||||
@@ -1102,8 +1105,12 @@ printf("paintHint: icon %s text %s\n", item->hintIcon.c_str(), g_Locale->getText
|
|||||||
int ypos2a = ypos2 + (hint_height/2)-2;
|
int ypos2a = ypos2 + (hint_height/2)-2;
|
||||||
int markh = hint_height > rad*2 ? hint_height - rad*2 : hint_height;
|
int markh = hint_height > rad*2 ? hint_height - rad*2 : hint_height;
|
||||||
int imarkh = iheight/2+1;
|
int imarkh = iheight/2+1;
|
||||||
CComponentsDetailLine details_line(xpos, ypos1a, ypos2a, imarkh, markh);
|
|
||||||
details_line.paint();
|
if (details_line == NULL)
|
||||||
|
details_line = new CComponentsDetailLine(xpos, ypos1a, ypos2a, imarkh, markh);
|
||||||
|
else
|
||||||
|
details_line->setYPos(ypos1a);
|
||||||
|
details_line->paint();
|
||||||
|
|
||||||
/* box shadow */
|
/* box shadow */
|
||||||
frameBuffer->paintBoxRel(x+SHADOW_OFFSET, ypos2+SHADOW_OFFSET, width + sb_width, hint_height, COL_MENUCONTENTDARK_PLUS_0, rad);
|
frameBuffer->paintBoxRel(x+SHADOW_OFFSET, ypos2+SHADOW_OFFSET, width + sb_width, hint_height, COL_MENUCONTENTDARK_PLUS_0, rad);
|
||||||
|
@@ -41,6 +41,7 @@
|
|||||||
#include <system/localize.h>
|
#include <system/localize.h>
|
||||||
#include <gui/widget/icons.h>
|
#include <gui/widget/icons.h>
|
||||||
#include <gui/color.h>
|
#include <gui/color.h>
|
||||||
|
#include <gui/widget/components.h>
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
@@ -422,6 +423,7 @@ class CMenuWidget : public CMenuTarget
|
|||||||
private:
|
private:
|
||||||
mn_widget_id_t widget_index;
|
mn_widget_id_t widget_index;
|
||||||
CMenuGlobal *mglobal;
|
CMenuGlobal *mglobal;
|
||||||
|
CComponentsDetailLine *details_line;
|
||||||
protected:
|
protected:
|
||||||
std::string nameString;
|
std::string nameString;
|
||||||
neutrino_locale_t name;
|
neutrino_locale_t name;
|
||||||
|
Reference in New Issue
Block a user