diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2011-05-03 23:56:32 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2011-05-03 23:56:32 +0200 |
commit | 55393ab7a5db0a02c3b4c3ecee13116abf8b0b56 (patch) | |
tree | d07e7a963bcbe50c930f6f157010d9c7cb9394c6 /src/corelib | |
parent | 3cdffc1188b2a50472224e679ffe7bb438d0dcc2 (diff) | |
download | fpGUI-55393ab7a5db0a02c3b4c3ecee13116abf8b0b56.tar.xz |
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].
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/fpg_main.pas | 6 |
1 files changed, 6 insertions, 0 deletions
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); |