summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2009-02-19 10:46:14 +0000
committergraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2009-02-19 10:46:14 +0000
commit7bdf40434bfd8525b2232871cb0e8e1ea96e001d (patch)
tree199a0fbefc6963e12dbf109bdbf0b9acfed30937 /src
parent71a84dc3eb2dfcdc391da78557873943edd959cd (diff)
downloadfpGUI-7bdf40434bfd8525b2232871cb0e8e1ea96e001d.tar.xz
no comments
Diffstat (limited to 'src')
-rw-r--r--src/gui/fpg_listview.pas29
1 files changed, 16 insertions, 13 deletions
diff --git a/src/gui/fpg_listview.pas b/src/gui/fpg_listview.pas
index acb4e337..f6688787 100644
--- a/src/gui/fpg_listview.pas
+++ b/src/gui/fpg_listview.pas
@@ -1,7 +1,7 @@
{
fpGUI - Free Pascal GUI Toolkit
- Copyright (C) 2006 - 2008 See the file AUTHORS.txt, included in this
+ Copyright (C) 2006 - 2009 See the file AUTHORS.txt, included in this
distribution, for details of the copyright.
See the file COPYING.modifiedLGPL, included in this distribution,
@@ -1205,17 +1205,14 @@ end;
procedure TfpgListView.HandlePaint;
var
- ClipRect: TfpgRect;
+ ClipRect: TfpgRect;
begin
//if FScrollBarNeedsUpdate then
UpdateScrollBarPositions;
fpgStyle.DrawControlFrame(Canvas, 0, 0, Width, Height);
- ClipRect.Top := 2;
- ClipRect.Left := 2;
- ClipRect.Width := Width -4;
- ClipRect.Height := Height -4;
-
+ ClipRect.SetRect(2, 2, Width-4, Height-4);
+
if ShowHeaders then
begin
PaintHeaders;
@@ -1225,7 +1222,8 @@ begin
Canvas.SetClipRect(ClipRect);
- // this paints the small square remaining below the vscrollbar and to the right of the hscrollbar
+ // This paints the small square remaining below the vscrollbar
+ // and to the right of the hscrollbar
if FVScrollBar.Visible and FHScrollBar.Visible then
begin
Canvas.Color := clButtonFace;
@@ -1369,7 +1367,8 @@ begin
else
Canvas.Color := clInactiveSel;
end
- else Canvas.Color := clListBox;
+ else
+ Canvas.Color := clListBox;
Canvas.FillRectangle(ItemRect);
Exclude(PaintPart, lvppBackground);
@@ -1416,9 +1415,12 @@ begin
tLeft := ItemRect.Left;
tWidth := Canvas.Font.TextWidth(TheText);
case FColumns.Column[J].Alignment of
- taRightJustify: Inc(tLeft, FColumns.Column[J].Width - tWidth - 5);
- taCenter: Inc(tLeft, (FColumns.Column[J].Width - tWidth - 5) div 2);
- taLeftJustify: Inc(tLeft, 5);
+ taRightJustify:
+ Inc(tLeft, FColumns.Column[J].Width - tWidth - 5);
+ taCenter:
+ Inc(tLeft, (FColumns.Column[J].Width - tWidth - 5) div 2);
+ taLeftJustify:
+ Inc(tLeft, 5);
end;
fpgStyle.DrawString(Canvas, tLeft, ItemRect.Top+2, TheText, Enabled);
@@ -1438,7 +1440,8 @@ begin
Dec(vBottom, FHScrollBar.Height);
// the painted items haven't fully covered the visible area
- if vBottom > cBottom then begin
+ if vBottom > cBottom then
+ begin
ItemRect.Left := 2;
ItemRect.Top := cBottom;
ItemRect.SetBottom(vBottom);