aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJoel Bodenmann <joel@unormal.org>2014-08-07 22:57:18 +0200
committerJoel Bodenmann <joel@unormal.org>2014-08-07 22:57:18 +0200
commitf94b496c0c1ace25491893702c856219825d9355 (patch)
treef45420447db743705430e7b9a55b39decdf9d7d0 /src
parentb2b09319e47fe37dc293a0c80bb7ac3a563f13e2 (diff)
downloaduGFX-f94b496c0c1ace25491893702c856219825d9355.tar.gz
uGFX-f94b496c0c1ace25491893702c856219825d9355.tar.bz2
uGFX-f94b496c0c1ace25491893702c856219825d9355.zip
Added optional transparency to container
Diffstat (limited to 'src')
-rw-r--r--src/gwin/gcontainer.c14
-rw-r--r--src/gwin/gcontainer.h1
2 files changed, 10 insertions, 5 deletions
diff --git a/src/gwin/gcontainer.c b/src/gwin/gcontainer.c
index 46e89032..0cca4092 100644
--- a/src/gwin/gcontainer.c
+++ b/src/gwin/gcontainer.c
@@ -93,11 +93,15 @@ coord_t gwinGetInnerHeight(GHandle gh) {
static coord_t BorderSize(GHandle gh) { return (gh->flags & GWIN_CONTAINER_BORDER) ? 2 : 0; }
static void DrawSimpleContainer(GWidgetObject *gw, 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))
- 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);
-}
+ (void)param;
+
+ if ((gw->g.flags & GWIN_CONTAINER_TRANSPARENT) == 0) {
+ 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
static const gcontainerVMT containerVMT = {
diff --git a/src/gwin/gcontainer.h b/src/gwin/gcontainer.h
index efba83f9..942cf8c0 100644
--- a/src/gwin/gcontainer.h
+++ b/src/gwin/gcontainer.h
@@ -105,6 +105,7 @@ extern "C" {
* @{
*/
#define GWIN_CONTAINER_BORDER 0x00000001
+ #define GWIN_CONTAINER_TRANSPARENT 0x00000002
/** @} */
/**