mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +02:00
* CComponentsItem::paintInit(): Corrected calculation of sw_cur
- Summarized calculate the values of shadow box
This commit is contained in:
@@ -67,7 +67,6 @@ void CComponentsItem::paintInit(bool do_save_bg)
|
||||
{
|
||||
clear();
|
||||
|
||||
int sw = shadow ? shadow_w : 0;
|
||||
int th = fr_thickness;
|
||||
fb_pixel_t col_frame_cur = col_frame;
|
||||
|
||||
@@ -80,14 +79,20 @@ void CComponentsItem::paintInit(bool do_save_bg)
|
||||
//calculate current needed corner radius for body box, depends of frame thickness
|
||||
int rad = (corner_rad>th) ? corner_rad-th : corner_rad;
|
||||
|
||||
//calculate positon of shadow areas
|
||||
int x_sh = corner_rad>0 ? x+width-2*corner_rad+sw : x+width; //right
|
||||
int y_sh = corner_rad>0 ? y+height-2*corner_rad+sw : y+height; //bottom
|
||||
|
||||
//calculate current shadow width depends of current corner_rad
|
||||
int sw_cur = sw;
|
||||
if (shadow)
|
||||
sw_cur = corner_rad>sw ? 2*corner_rad : sw;
|
||||
int sw = 0, sw_cur = 0;
|
||||
int x_sh = x + width;
|
||||
int y_sh = y + height;
|
||||
if (shadow) {
|
||||
sw = shadow_w;
|
||||
sw_cur = sw;
|
||||
if (corner_type && corner_rad) {
|
||||
//calculate positon of shadow areas
|
||||
x_sh += sw - 2*corner_rad;
|
||||
y_sh += sw - 2*corner_rad;
|
||||
//calculate current shadow width depends of current corner_rad
|
||||
sw_cur = max(2*corner_rad, sw);
|
||||
}
|
||||
}
|
||||
|
||||
comp_fbdata_t fbdata[] =
|
||||
{
|
||||
|
Reference in New Issue
Block a user