Added optional transparency to container
This commit is contained in:
parent
b2b09319e4
commit
f94b496c0c
2 changed files with 10 additions and 5 deletions
|
@ -93,11 +93,15 @@ coord_t gwinGetInnerHeight(GHandle gh) {
|
||||||
static coord_t BorderSize(GHandle gh) { return (gh->flags & GWIN_CONTAINER_BORDER) ? 2 : 0; }
|
static coord_t BorderSize(GHandle gh) { return (gh->flags & GWIN_CONTAINER_BORDER) ? 2 : 0; }
|
||||||
|
|
||||||
static void DrawSimpleContainer(GWidgetObject *gw, void *param) {
|
static void DrawSimpleContainer(GWidgetObject *gw, void *param) {
|
||||||
(void) param;
|
(void)param;
|
||||||
gdispGFillArea(gw->g.display, gw->g.x, gw->g.y, gw->g.width, gw->g.height, gw->pstyle->background);
|
|
||||||
if ((gw->g.flags & GWIN_CONTAINER_BORDER))
|
if ((gw->g.flags & GWIN_CONTAINER_TRANSPARENT) == 0) {
|
||||||
gdispGDrawBox(gw->g.display, gw->g.x, gw->g.y, gw->g.width, gw->g.height, (gw->g.flags & GWIN_FLG_SYSENABLED) ? gw->pstyle->enabled.edge : gw->pstyle->disabled.edge);
|
gdispGFillArea(gw->g.display, gw->g.x, gw->g.y, gw->g.width, gw->g.height, gw->pstyle->background);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((gw->g.flags & GWIN_CONTAINER_BORDER))
|
||||||
|
gdispGDrawBox(gw->g.display, gw->g.x, gw->g.y, gw->g.width, gw->g.height, (gw->g.flags & GWIN_FLG_SYSENABLED) ? gw->pstyle->enabled.edge : gw->pstyle->disabled.edge);
|
||||||
|
}
|
||||||
|
|
||||||
// The container VMT table
|
// The container VMT table
|
||||||
static const gcontainerVMT containerVMT = {
|
static const gcontainerVMT containerVMT = {
|
||||||
|
|
|
@ -105,6 +105,7 @@ extern "C" {
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define GWIN_CONTAINER_BORDER 0x00000001
|
#define GWIN_CONTAINER_BORDER 0x00000001
|
||||||
|
#define GWIN_CONTAINER_TRANSPARENT 0x00000002
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue