From 55393ab7a5db0a02c3b4c3ecee13116abf8b0b56 Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Tue, 3 May 2011 23:56:32 +0200 Subject: New style method introduced: TfpgStyle.GetButtonShift This allows a style to define by how much the button image and text must shift (if at all) when the button is pressed. Possitive numbers moves right and down. Negative numbers move up and left. Zero values means the icon and text doesn't move [like under Mac OS X]. --- src/corelib/fpg_main.pas | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/corelib') diff --git a/src/corelib/fpg_main.pas b/src/corelib/fpg_main.pas index a6f6b0cc..d3b7693d 100644 --- a/src/corelib/fpg_main.pas +++ b/src/corelib/fpg_main.pas @@ -217,6 +217,7 @@ type procedure DrawMenuItemSeparator(ACanvas: TfpgCanvas; r: TfpgRect); virtual; procedure DrawMenuItemImage(ACanvas: TfpgCanvas; x, y: TfpgCoord; r: TfpgRect; AFlags: TfpgMenuItemFlags); virtual; function GetButtonBorders: TRect; virtual; + function GetButtonShift: TPoint; virtual; function GetControlFrameBorders: TRect; virtual; function GetSeparatorSize: integer; virtual; end; @@ -2349,6 +2350,11 @@ begin Result := Rect(5, 5, 5, 5); end; +function TfpgStyle.GetButtonShift: TPoint; +begin + Result := Point(1, 1); +end; + function TfpgStyle.GetControlFrameBorders: TRect; begin Result := Rect(2, 2, 2, 2); -- cgit v1.2.3-70-g09d2