summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2010-11-30 12:15:30 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2010-11-30 12:15:30 +0200
commite1296c1897bc53454ae7da1d66208bd0ee4451c2 (patch)
treecb59fd0cc1047bb64f009e99a263c50cd89ad8f2
parent721ea0178f0ee526925b22783e663d908a348afb (diff)
downloadfpGUI-e1296c1897bc53454ae7da1d66208bd0ee4451c2.tar.xz
TfpgMenuBar now offloads menu bar background painting to current fpgStyle instance.
-rw-r--r--src/gui/fpg_menu.pas13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/gui/fpg_menu.pas b/src/gui/fpg_menu.pas
index cd1c1ba5..cc2d0884 100644
--- a/src/gui/fpg_menu.pas
+++ b/src/gui/fpg_menu.pas
@@ -527,16 +527,9 @@ var
r: TfpgRect;
begin
Canvas.BeginDraw;
- inherited HandlePaint;
+
r.SetRect(0, 0, Width, Height);
- Canvas.Clear(FBackgroundColor);
-// Canvas.DrawButtonFace(r, []);
- // inner bottom line
- Canvas.SetColor(clShadow1);
- Canvas.DrawLine(r.Left, r.Bottom-1, r.Right+1, r.Bottom-1); // bottom
- // outer bottom line
- Canvas.SetColor(clWhite);
- Canvas.DrawLine(r.Left, r.Bottom, r.Right+1, r.Bottom); // bottom
+ fpgStyle.DrawMenuBar(Canvas, r, FBackgroundColor);
for n := 0 to VisibleCount-1 do
DrawColumn(n, n = FocusItem);
@@ -616,8 +609,6 @@ begin
Canvas.SetTextColor(clMenuDisabled);
end;
end; { if/else }
- // a possible future theme option
-// Canvas.GradientFill(r, FLightColor, FDarkColor, gdVertical);
mi.DrawText(Canvas, r.left+4, r.top+1, cImgWidth);
Exit; //==>
end; { if col=n }