         // the shading and highlight are drawn in FXG
         var contentEllipseSize:Number = contentCornerRadius * 2;
         var contentBackgroundAlpha:Number = getStyle("contentBackgroundAlpha");
+        var contentWidth:Number = contentGroup.getLayoutBoundsWidth();
+        var contentHeight:Number = contentGroup.getLayoutBoundsHeight();
         
         graphics.beginFill(getStyle("contentBackgroundColor"),
             contentBackgroundAlpha);
         graphics.drawRoundRect(contentBackgroundGraphic.getLayoutBoundsX(),
             contentBackgroundGraphic.getLayoutBoundsY(),
-            contentBackgroundGraphic.getLayoutBoundsWidth(),
-            contentBackgroundGraphic.getLayoutBoundsHeight(),
+            contentWidth,
+            contentHeight,
             contentEllipseSize,
             contentEllipseSize);
         graphics.endFill();
         
+        if (contentMask)
+        {
+            // content mask in contentGroup coordinate space
+            var maskGraphics:Graphics = contentMask.graphics;
+            maskGraphics.clear();
+            maskGraphics.beginFill(0, 1);
+            maskGraphics.drawRoundRect(0, 0, contentWidth, contentHeight,
+                contentEllipseSize, contentEllipseSize);
+            maskGraphics.endFill();
+        }
+        
         contentBackgroundGraphic.alpha = contentBackgroundAlpha;
     }
 }

     */ 
    override protected function createChildren():void
    {
        contentBackgroundGraphic = new contentBackgroundClass() as SpriteVisualElement;
        addChild(contentBackgroundGraphic);
        
        super.createChildren();
    }
    
    /**

            setElementSize(contentBackgroundGraphic, unscaledWidth, contentGroupHeight);
            setElementPosition(contentBackgroundGraphic, 0, actionBarHeight + gap);
        }
        
        setElementSize(contentMask, unscaledWidth, contentGroupHeight);
        setElementPosition(contentBackgroundGraphic, 0, actionBarHeight + gap);
    }
    
    /**
