diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-07-01 16:24:02 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-07-01 16:24:02 +0200 |
commit | 6c42452705d72c48958791edcd1961d44261d52d (patch) | |
tree | a674c253175c895976dfa473ee1da32e924074f9 /src/gui | |
parent | 7b85a6d7e2243640c2389c26f586720da0596d3e (diff) | |
download | fpGUI-6c42452705d72c48958791edcd1961d44261d52d.tar.xz |
TfpgBevel has a new Shape type: bsVerDivider
It's similar to bsLeftLine, but looks a bit prettier. :-)
It could also possibly be used as a grab handle for movable
toolbars in the future.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/fpg_panel.pas | 41 |
1 files changed, 12 insertions, 29 deletions
diff --git a/src/gui/fpg_panel.pas b/src/gui/fpg_panel.pas index b11ccd68..68129136 100644 --- a/src/gui/fpg_panel.pas +++ b/src/gui/fpg_panel.pas @@ -32,7 +32,7 @@ uses type TPanelShape = (bsBox, bsFrame, bsTopLine, bsBottomLine, bsLeftLine, - bsRightLine, bsSpacer); + bsRightLine, bsSpacer, bsVerDivider); TPanelStyle = (bsLowered, bsRaised); @@ -426,39 +426,21 @@ end; procedure TfpgBevel.DrawVerDivider; begin - if Shape in [bsBox] then - if FPanelBorder = bsSingle then - Canvas.DrawLine(0, 0, Width - 1, 0) - else - Canvas.DrawLine(0, 1, Width - 1, 1); - if Shape in [bsFrame, bsTopLine] then - Canvas.DrawLine(0, 0, Width - 1, 0); - if Shape in [bsBox] then - if FPanelBorder = bsSingle then - Canvas.DrawLine(0, 1, 0, Height - 1) - else - Canvas.DrawLine(1, 1, 1, Height - 1); - if Shape in [bsFrame, bsLeftLine] then - Canvas.DrawLine(0, 1, 0, Height - 1); - if Shape in [bsFrame, bsRightLine] then - Canvas.DrawLine(Width - 2, 1, Width - 2, Height - 1); - if Shape in [bsFrame, bsBottomLine] then - Canvas.DrawLine(1, Height - 2, Width - 1, Height - 2); + if Style = bsRaised then + Canvas.SetColor(clHilite2) + else + Canvas.SetColor(clShadow1); + + Canvas.DrawLine(0, 0, 3, 0); + Canvas.DrawLine(0, 0, 0, Height - 1); if Style = bsRaised then - Canvas.SetColor(clShadow2) + Canvas.SetColor(clShadow1) else Canvas.SetColor(clHilite2); - if Shape in [bsFrame, bsTopLine] then - Canvas.DrawLine(1, 1, Width - 2, 1); - if Shape in [bsFrame, bsLeftLine] then - Canvas.DrawLine(1, 2, 1, Height - 2); - if Shape in [bsBox, bsFrame, bsRightLine] then - Canvas.DrawLine(Width - 1, 0, Width - 1, Height - 1); - if Shape in [bsBox, bsFrame, bsBottomLine] then - Canvas.DrawLine(0, Height - 1, Width, Height - 1); - + Canvas.DrawLine(0, Height - 1, 2, Height - 1); + Canvas.DrawLine(2, Height - 1, 2, 0); end; procedure TfpgBevel.HandlePaint; @@ -483,6 +465,7 @@ begin bsLeftLine: DrawLeftLine; bsRightLine: DrawRightLine; bsSpacer: DrawSpacer; + bsVerDivider: DrawVerDivider; end; end; |