diff options
-rw-r--r-- | examples/gui/alignment/aligntest.lpi | 3 | ||||
-rw-r--r-- | examples/gui/alignment/aligntest.lpr | 1 | ||||
-rw-r--r-- | examples/gui/colorlistbox/frmMain.pas | 4 | ||||
-rwxr-xr-x | examples/gui/compileall.sh | 16 | ||||
-rw-r--r-- | examples/gui/listviewtest/listviewtest.lpr | 4 | ||||
-rw-r--r-- | examples/gui/memo/extrafpc.cfg | 5 | ||||
-rw-r--r-- | examples/gui/menutest/menutest.lpr | 2 | ||||
-rw-r--r-- | examples/gui/splashscreen/frm_splashscreen.pas | 2 | ||||
-rw-r--r-- | examples/gui/tabtest/tabtest.lpr | 2 | ||||
-rw-r--r-- | examples/gui/wulinetest/wuline_test.lpr | 1 | ||||
-rw-r--r-- | src/gui/gui_menu.pas | 2 |
11 files changed, 29 insertions, 13 deletions
diff --git a/examples/gui/alignment/aligntest.lpi b/examples/gui/alignment/aligntest.lpi index 65f68a59..3dd0cfa7 100644 --- a/examples/gui/alignment/aligntest.lpi +++ b/examples/gui/alignment/aligntest.lpi @@ -4,6 +4,9 @@ <PathDelim Value="/"/> <Version Value="6"/> <General> + <Flags> + <SaveOnlyProjectUnits Value="True"/> + </Flags> <SessionStorage Value="InProjectDir"/> <MainUnit Value="0"/> <IconPath Value="./"/> diff --git a/examples/gui/alignment/aligntest.lpr b/examples/gui/alignment/aligntest.lpr index a13b5ffd..47b5adcd 100644 --- a/examples/gui/alignment/aligntest.lpr +++ b/examples/gui/alignment/aligntest.lpr @@ -15,7 +15,6 @@ type lblRight: array[1..3] of TfpgLabel; lblClient: TfpgLabel; lblNone: TfpgLabel; - AlignRect: TfpgRect; public procedure AfterCreate; override; end; diff --git a/examples/gui/colorlistbox/frmMain.pas b/examples/gui/colorlistbox/frmMain.pas index 5ec2d98c..cc700c4b 100644 --- a/examples/gui/colorlistbox/frmMain.pas +++ b/examples/gui/colorlistbox/frmMain.pas @@ -74,10 +74,6 @@ begin end; procedure TMainForm.PopulatePaletteColorCombo; -var - TypeData: PTypeData; - I: Integer; - S: string; begin cbName1.Items.Clear; cbName1.Items.Add('cpStandardColors'); diff --git a/examples/gui/compileall.sh b/examples/gui/compileall.sh new file mode 100755 index 00000000..151c6666 --- /dev/null +++ b/examples/gui/compileall.sh @@ -0,0 +1,16 @@ +#!/bin/sh +FPC=fpc +for f in `find -name '*.lpr'` +do + DIR=`dirname $f` + PROJECT=`basename $f` + LPRNAME=`basename $PROJECT .lpr` + echo Doing $LPRNAME + cd $DIR + if [ ! -d units ]; then + echo 'Missing units dir' + mkdir units + fi + $FPC @extrafpc.cfg $PROJECT; + cd .. +done diff --git a/examples/gui/listviewtest/listviewtest.lpr b/examples/gui/listviewtest/listviewtest.lpr index 553e2d53..8e15a631 100644 --- a/examples/gui/listviewtest/listviewtest.lpr +++ b/examples/gui/listviewtest/listviewtest.lpr @@ -40,14 +40,13 @@ end; procedure TMainForm.AddBttn(Sender: TObject); var Item: TfpgLVItem; - I: Integer; begin FListView.BeginUpdate; FTmpListView.BeginUpdate; //FListView.Items.Capacity := FListView.Items.Capacity + 2000000; //for I := 0 to 1999999 do begin Item := FListView.ItemAdd; - Item.Caption :=FEdit.Text+IntToStr(FListView.Items.Count); + Item.Caption := FEdit.Text + IntToStr(FListView.Items.Count); Item.SubItems.Add('0'); Item.SubItems.Add('1'); Item.SubItems.Add('2'); @@ -56,7 +55,6 @@ begin //end; FListView.EndUpdate; FTmpListView.EndUpdate; - end; procedure TMainForm.ShowHeadersChange(Sender: TObject); diff --git a/examples/gui/memo/extrafpc.cfg b/examples/gui/memo/extrafpc.cfg new file mode 100644 index 00000000..073dc4b6 --- /dev/null +++ b/examples/gui/memo/extrafpc.cfg @@ -0,0 +1,5 @@ +-FUunits +-Fu../../../lib +-Xs +-XX +-CX diff --git a/examples/gui/menutest/menutest.lpr b/examples/gui/menutest/menutest.lpr index 801bdb97..4a8b9244 100644 --- a/examples/gui/menutest/menutest.lpr +++ b/examples/gui/menutest/menutest.lpr @@ -42,8 +42,6 @@ begin end; constructor TMainForm.Create(AOwner: TComponent); -var - mi: TfpgMenuItem; begin inherited Create(AOwner); WindowTitle := 'Menu Test'; diff --git a/examples/gui/splashscreen/frm_splashscreen.pas b/examples/gui/splashscreen/frm_splashscreen.pas index 894ba11a..6001a8ee 100644 --- a/examples/gui/splashscreen/frm_splashscreen.pas +++ b/examples/gui/splashscreen/frm_splashscreen.pas @@ -72,7 +72,7 @@ constructor TSplashForm.Create(AOwner: TComponent); begin inherited Create(AOwner); WindowType := wtPopup; // removes borders and title bar - Include(WindowAttributes, waStayOnTop); // well, it lets the window stay on top. :) + WindowAttributes := WindowAttributes + [waStayOnTop]; // well, it lets the window stay on top. :) tmr := TfpgTimer.Create(3000); tmr.OnTimer := @TimerFired; diff --git a/examples/gui/tabtest/tabtest.lpr b/examples/gui/tabtest/tabtest.lpr index 80ea97e5..e221e012 100644 --- a/examples/gui/tabtest/tabtest.lpr +++ b/examples/gui/tabtest/tabtest.lpr @@ -18,7 +18,7 @@ type tsTwo: TfpgTabSheet; tsThree: TfpgTabSheet; tsFour: TfpgTabSheet; - btn2, btn3, btn4: TfpgButton; + btn2, btn3: TfpgButton; chkSort: TfpgCheckBox; cbTabPos: TfpgComboBox; procedure btnQuitClick(Sender: TObject); diff --git a/examples/gui/wulinetest/wuline_test.lpr b/examples/gui/wulinetest/wuline_test.lpr index 7459b0f2..17b4ec3c 100644 --- a/examples/gui/wulinetest/wuline_test.lpr +++ b/examples/gui/wulinetest/wuline_test.lpr @@ -67,7 +67,6 @@ procedure TMainForm.DrawSpokes(phase: double); var x1, y1, x2, y2: integer; theta: double; - img: TfpgImage; begin Canvas.BeginDraw; diff --git a/src/gui/gui_menu.pas b/src/gui/gui_menu.pas index 3242685c..f5c8aeeb 100644 --- a/src/gui/gui_menu.pas +++ b/src/gui/gui_menu.pas @@ -579,6 +579,8 @@ begin end; end; { if/else } Canvas.FillRectangle(r); + // a possible future theme option +// Canvas.GradientFill(r, FLightColor, FDarkColor, gdVertical); mi.DrawText(Canvas, r.left+4, r.top+1); Canvas.EndDraw(r.Left, r.Top, r.Width, r.Height); Exit; //==> |