diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-07-02 13:08:02 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-07-02 13:08:02 +0200 |
commit | 6372ff01264c3c158645dd732556ecfa481de4ad (patch) | |
tree | d1e6d2497875386bdb6b5c3586fffd52096d04cf /src/gui | |
parent | e97f83dd2d334d5955688e75f893b68d757a144f (diff) | |
download | fpGUI-6372ff01264c3c158645dd732556ecfa481de4ad.tar.xz |
fpg_panel: bsVerDivider now takes BorderStyle into account.
If BorderStyle = bsDouble, it now paints two dividers.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/fpg_panel.pas | 34 |
1 files changed, 21 insertions, 13 deletions
diff --git a/src/gui/fpg_panel.pas b/src/gui/fpg_panel.pas index f14b8447..b58b516d 100644 --- a/src/gui/fpg_panel.pas +++ b/src/gui/fpg_panel.pas @@ -436,22 +436,30 @@ begin end; procedure TfpgBevel.DrawVerDivider; -begin - if Style = bsRaised then - Canvas.SetColor(clHilite2) - else - Canvas.SetColor(clShadow1); - Canvas.DrawLine(0, 0, 3, 0); - Canvas.DrawLine(0, 0, 0, Height - 1); + procedure PaintLine(px, py: integer); + begin + if Style = bsRaised then + Canvas.SetColor(clHilite2) + else + Canvas.SetColor(clShadow1); - if Style = bsRaised then - Canvas.SetColor(clShadow1) - else - Canvas.SetColor(clHilite2); + Canvas.DrawLine(px, py, px+2, py); + Canvas.DrawLine(px, py, px, Height); + + if Style = bsRaised then + Canvas.SetColor(clShadow1) + else + Canvas.SetColor(clHilite2); - Canvas.DrawLine(0, Height - 1, 2, Height - 1); - Canvas.DrawLine(2, Height - 1, 2, 0); + Canvas.DrawLine(px+1, Height - 1, px+3, Height - 1); + Canvas.DrawLine(px+2, py, px+2, Height); + end; + +begin + PaintLine(0, 0); + if FPanelBorder = bsDouble then + PaintLine(3, 0); end; procedure TfpgBevel.HandlePaint; |