mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 16:01:10 +02:00
cc_item: use different corner radius for shadow
Origin commit data
------------------
Branch: ni/coolstream
Commit: 214d7045b8
Author: Thilo Graf <dbt@novatux.de>
Date: 2020-12-07 (Mon, 07 Dec 2020)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -127,9 +127,12 @@ void CComponentsItem::paintInit(const bool &do_save_bg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
///evaluate shadow layer parts
|
///evaluate shadow layer parts
|
||||||
|
// shadow rad, must be larger than body shadow
|
||||||
|
int sh_rad = box_rad > 0 ? box_rad+getShadowWidth()/2 : 0;
|
||||||
|
|
||||||
//handle general shadow corner dimensions
|
//handle general shadow corner dimensions
|
||||||
int sh_cdx = box_rad+sw+th; //width
|
int sh_cdx = sh_rad+sw+th; //width
|
||||||
int sh_cdy = box_rad+sw+th; //height
|
int sh_cdy = sh_rad+sw+th; //height
|
||||||
|
|
||||||
//adapt shadow corner dimensions if body dimensions are too small, use an offset if required
|
//adapt shadow corner dimensions if body dimensions are too small, use an offset if required
|
||||||
int /*sh_cdx_size_offset = 0,*/ sh_cdy_size_offset = 0;
|
int /*sh_cdx_size_offset = 0,*/ sh_cdy_size_offset = 0;
|
||||||
@@ -182,32 +185,32 @@ void CComponentsItem::paintInit(const bool &do_save_bg)
|
|||||||
v_fbdata.push_back({true, CC_FBDATA_TYPE_BGSCREEN, ix, iy, dx+sw, dy+sw, 0, 0, 0, 0, NULL, NULL, NULL, false});
|
v_fbdata.push_back({true, CC_FBDATA_TYPE_BGSCREEN, ix, iy, dx+sw, dy+sw, 0, 0, 0, 0, NULL, NULL, NULL, false});
|
||||||
|
|
||||||
//shadow corner bottom left
|
//shadow corner bottom left
|
||||||
v_fbdata.push_back({sh_cbl, CC_FBDATA_TYPE_SHADOW_BOX, sh_cbl_x, sh_cbl_y, sh_cdx, sh_cdy, col_shadow, box_rad, corner_type & CORNER_BOTTOM_LEFT, 0, NULL, NULL, NULL, false});
|
v_fbdata.push_back({sh_cbl, CC_FBDATA_TYPE_SHADOW_BOX, sh_cbl_x, sh_cbl_y, sh_cdx, sh_cdy, col_shadow, sh_rad , corner_type & CORNER_BOTTOM_LEFT, 0, NULL, NULL, NULL, false});
|
||||||
//clean up inside body
|
//clean up inside body
|
||||||
v_fbdata.push_back({sh_cbl, CC_FBDATA_TYPE_SHADOW_BOX, sh_cbl_x-sw+th, sh_cbl_y-sw, sh_cdx+sw, sh_cdy, col_shadow_clean, box_rad, corner_type & CORNER_BOTTOM_LEFT, 0, NULL, NULL, NULL, false});
|
v_fbdata.push_back({sh_cbl, CC_FBDATA_TYPE_SHADOW_BOX, sh_cbl_x-sw+th, sh_cbl_y-sw, sh_cdx+sw, sh_cdy, col_shadow_clean, sh_rad, corner_type & CORNER_BOTTOM_LEFT, 0, NULL, NULL, NULL, false});
|
||||||
|
|
||||||
//shadow bar bottom
|
//shadow bar bottom
|
||||||
v_fbdata.push_back({sh_bb, CC_FBDATA_TYPE_SHADOW_BOX, sh_bx, sh_by, sh_bdx, sw, col_shadow, 0, CORNER_NONE, 0, NULL, NULL, NULL, false});
|
v_fbdata.push_back({sh_bb, CC_FBDATA_TYPE_SHADOW_BOX, sh_bx, sh_by, sh_bdx, sw, col_shadow, 0, CORNER_NONE, 0, NULL, NULL, NULL, false});
|
||||||
|
|
||||||
//shadow corner bottom right
|
//shadow corner bottom right
|
||||||
v_fbdata.push_back({sh_cbr, CC_FBDATA_TYPE_SHADOW_BOX, sh_cbr_x, sh_cbr_y, sh_cdx, sh_cdy, col_shadow, box_rad, corner_type & CORNER_BOTTOM_RIGHT, 0, NULL, NULL, NULL, false});
|
v_fbdata.push_back({sh_cbr, CC_FBDATA_TYPE_SHADOW_BOX, sh_cbr_x, sh_cbr_y, sh_cdx, sh_cdy, col_shadow, sh_rad , corner_type & CORNER_BOTTOM_RIGHT, 0, NULL, NULL, NULL, false});
|
||||||
//clean up inside body
|
//clean up inside body
|
||||||
v_fbdata.push_back({sh_cbr, CC_FBDATA_TYPE_SHADOW_BOX, sh_cbr_x-sw, sh_cbr_y-sw, sh_cdx, sh_cdy, col_shadow_clean, box_rad, corner_type & CORNER_BOTTOM_RIGHT, 0, NULL, NULL, NULL, false});
|
v_fbdata.push_back({sh_cbr, CC_FBDATA_TYPE_SHADOW_BOX, sh_cbr_x-sw, sh_cbr_y-sw, sh_cdx, sh_cdy, col_shadow_clean, sh_rad , corner_type & CORNER_BOTTOM_RIGHT, 0, NULL, NULL, NULL, false});
|
||||||
|
|
||||||
//shadow bar right
|
//shadow bar right
|
||||||
v_fbdata.push_back({sh_br, CC_FBDATA_TYPE_SHADOW_BOX, sh_rx, sh_ry, sw, sh_rdy, col_shadow, 0, CORNER_NONE, 0, NULL, NULL, NULL, false});
|
v_fbdata.push_back({sh_br, CC_FBDATA_TYPE_SHADOW_BOX, sh_rx, sh_ry, sw, sh_rdy, col_shadow, 0, CORNER_NONE, 0, NULL, NULL, NULL, false});
|
||||||
|
|
||||||
//shadow corner top right
|
//shadow corner top right
|
||||||
v_fbdata.push_back({sh_ctr, CC_FBDATA_TYPE_SHADOW_BOX, sh_ctr_x, sh_ctr_y, sh_cdx, sh_cdy-sh_cdy_size_offset, col_shadow, box_rad, corner_type & CORNER_TOP_RIGHT, 0, NULL, NULL, NULL, false});
|
v_fbdata.push_back({sh_ctr, CC_FBDATA_TYPE_SHADOW_BOX, sh_ctr_x, sh_ctr_y, sh_cdx, sh_cdy-sh_cdy_size_offset, col_shadow, sh_rad, corner_type & CORNER_TOP_RIGHT, 0, NULL, NULL, NULL, false});
|
||||||
//clean up inside body
|
//clean up inside body
|
||||||
v_fbdata.push_back({sh_ctr, CC_FBDATA_TYPE_SHADOW_BOX, sh_ctr_x-sw, sh_ctr_y-sw+th, sh_cdx, sh_cdy-sh_cdy_size_offset+sw, col_shadow_clean, box_rad, corner_type & CORNER_TOP_RIGHT, 0, NULL, NULL, NULL, false});
|
v_fbdata.push_back({sh_ctr, CC_FBDATA_TYPE_SHADOW_BOX, sh_ctr_x-sw, sh_ctr_y-sw+th, sh_cdx, sh_cdy-sh_cdy_size_offset+sw, col_shadow_clean, sh_rad , corner_type & CORNER_TOP_RIGHT, 0, NULL, NULL, NULL, false});
|
||||||
|
|
||||||
//main box
|
//main box
|
||||||
v_fbdata.push_back({true, CC_FBDATA_TYPE_BOX, ix+th, iy+th, dx-2*th, dy-2*th, col_body, max(0,box_rad-th),corner_type, 0, NULL, NULL, NULL, false});
|
v_fbdata.push_back({true, CC_FBDATA_TYPE_BOX, ix+th, iy+th, dx-2*th, dy-2*th, col_body, max(0,box_rad-th),corner_type, 0, NULL, NULL, NULL, false});
|
||||||
|
|
||||||
//frame
|
//frame
|
||||||
if (fr_thickness)
|
if (fr_thickness)
|
||||||
v_fbdata.push_back({true, CC_FBDATA_TYPE_FRAME, ix, iy, dx, dy, col_frame_cur, box_rad, corner_type, th, NULL, NULL, NULL, false});
|
v_fbdata.push_back({true, CC_FBDATA_TYPE_FRAME, ix, iy, dx, dy, col_frame_cur, box_rad, corner_type, th, NULL, NULL, NULL, false});
|
||||||
}
|
}
|
||||||
|
|
||||||
dprintf(DEBUG_DEBUG, "\033[1;32m[CComponentsItem]\t[%s - %d], init and paint item type = %d [%s]...\033[0m\n", __func__, __LINE__, cc_item_type.id, cc_item_type.name.c_str());
|
dprintf(DEBUG_DEBUG, "\033[1;32m[CComponentsItem]\t[%s - %d], init and paint item type = %d [%s]...\033[0m\n", __func__, __LINE__, cc_item_type.id, cc_item_type.name.c_str());
|
||||||
|
Reference in New Issue
Block a user