diff --git a/lib/libtuxtxt/tuxtxt_common.h b/lib/libtuxtxt/tuxtxt_common.h index bd7e15fa8..2d9e07d25 100644 --- a/lib/libtuxtxt/tuxtxt_common.h +++ b/lib/libtuxtxt/tuxtxt_common.h @@ -309,7 +309,7 @@ void tuxtxt_decode_adip() /* additional information table */ #endif } /* next adip page i */ - while (!tuxtxt_cache.adippg[tuxtxt_cache.maxadippg] && (tuxtxt_cache.maxadippg >= 0)) /* and shrink table */ + while ((tuxtxt_cache.maxadippg >= 0) && !tuxtxt_cache.adippg[tuxtxt_cache.maxadippg]) /* and shrink table */ tuxtxt_cache.maxadippg--; } /****************************************************************************** diff --git a/src/gui/components/cc_frm_scrollbar.cpp b/src/gui/components/cc_frm_scrollbar.cpp index ad2189689..529d0102a 100644 --- a/src/gui/components/cc_frm_scrollbar.cpp +++ b/src/gui/components/cc_frm_scrollbar.cpp @@ -25,7 +25,6 @@ #include #endif -#include #include #include "cc_frm_scrollbar.h" #include "system/debug.h" diff --git a/src/gui/components/cc_frm_scrollbar.h b/src/gui/components/cc_frm_scrollbar.h index 8057147ec..778349ac1 100644 --- a/src/gui/components/cc_frm_scrollbar.h +++ b/src/gui/components/cc_frm_scrollbar.h @@ -24,6 +24,8 @@ #ifndef __CC_FORM_SCROLLBAR_H__ #define __CC_FORM_SCROLLBAR_H__ +#include + #include "cc_frm_chain.h" #include "cc_item_picture.h" @@ -77,7 +79,7 @@ class CComponentsScrollBar : public CComponentsFrmChain */ CComponentsScrollBar( const int &x_pos, const int &y_pos, - const int &w = 15, + const int &w = SCROLLBAR_WIDTH, const int &h = 0, const int& count = 1, CComponentsForm *parent = NULL, diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index 2958d35ea..347ee7774 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -1212,7 +1212,7 @@ void CMenuWidget::calcSize() //scrollbar width sb_width=0; if(total_pages > 1) - sb_width=15; + sb_width=SCROLLBAR_WIDTH; full_width = /*ConnectLineBox_Width+*/width+sb_width+OFFSET_SHADOW; full_height = height+RADIUS_LARGE+OFFSET_SHADOW*2 /*+hint_height+OFFSET_INTER*/; @@ -1343,9 +1343,9 @@ void CMenuWidget::paintItems() if(total_pages>1) { int item_height=height-(item_start_y-y); - paintScrollBar(x+ width, item_start_y, 15, item_height, total_pages, current_page); -// /* background of menu items, paint every time because different items can have -// * different height and this might leave artifacts otherwise after changing pages */ + paintScrollBar(x+ width, item_start_y, sb_width, item_height, total_pages, current_page); + /* background of menu items, paint every time because different items can have + * different height and this might leave artifacts otherwise after changing pages */ frameBuffer->paintBoxRel(x,item_start_y, width,item_height, COL_MENUCONTENT_PLUS_0); } diff --git a/src/system/settings.h b/src/system/settings.h index 5190feb48..1540495e3 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -972,6 +972,8 @@ const time_settings_struct_t timing_setting[SNeutrinoSettings::TIMING_SETTING_CO #define OFFSET_INNER_MIN 2 #define OFFSET_INNER_NONE 0 +#define SCROLLBAR_WIDTH OFFSET_INNER_MID + 2*OFFSET_INNER_MIN + struct SglobalInfo { unsigned char box_Type;