From 0d9d5836a62a0a1558735f18de10af484b0da3b3 Mon Sep 17 00:00:00 2001 From: maxim Date: Mon, 30 Oct 2017 21:39:04 +0000 Subject: [PATCH] Merged revision(s) 56223 #748967367b, 56225-56228 #e96879b669-#e96879b669 from trunk: examples/treeview: Use default font (instead of MS SansSerif) ........ examples/ResizeImageDemo: remove unit Windows from "uses". ........ examples/dbeditmask: Fix crash due to incorrect dateseparator in some countries. Use default font instead of MS SansSerif. ........ examples/componentstreaming: Preving explaining labels reaching beyond form borders. ........ Examples/synedit1: Fix compilation issue ........ git-svn-id: branches/fixes_1_8@56245 - --- examples/ReSizeImageDemo/project1.lpi | 6 +--- examples/ReSizeImageDemo/unit1.lfm | 14 ++++---- examples/ReSizeImageDemo/unit1.pas | 2 +- examples/componentstreaming/mainunit.lfm | 40 +++++++++++++---------- examples/dbeditmask/Unit1.lfm | 24 +++++++------- examples/dbeditmask/Unit1.pas | 1 + examples/dbeditmask/project1.lpi | 2 +- examples/dbeditmask/project1.res | Bin 1657 -> 1779 bytes examples/synedit1.pas | 2 +- examples/treeview/tv_add_remove.lpi | 2 +- examples/treeview/tv_add_remove_u1.lfm | 6 +--- 11 files changed, 47 insertions(+), 52 deletions(-) diff --git a/examples/ReSizeImageDemo/project1.lpi b/examples/ReSizeImageDemo/project1.lpi index f71461770f..f9d6652e1b 100644 --- a/examples/ReSizeImageDemo/project1.lpi +++ b/examples/ReSizeImageDemo/project1.lpi @@ -1,21 +1,17 @@ - + <ResourceType Value="res"/> <UseXPManifest Value="True"/> - <Icon Value="0"/> </General> <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> diff --git a/examples/ReSizeImageDemo/unit1.lfm b/examples/ReSizeImageDemo/unit1.lfm index fe3476c4e3..e33de93d40 100644 --- a/examples/ReSizeImageDemo/unit1.lfm +++ b/examples/ReSizeImageDemo/unit1.lfm @@ -11,7 +11,7 @@ object Form1: TForm1 OnCreate = FormCreate OnResize = FormResize ShowHint = True - LCLVersion = '1.5' + LCLVersion = '1.9.0.0' object Pnl1: TPanel Left = 0 Height = 63 @@ -23,25 +23,25 @@ object Form1: TForm1 TabOrder = 0 object CheckBoxImage: TCheckBox Left = 168 - Height = 22 + Height = 19 Top = 0 - Width = 167 + Width = 144 Caption = 'Redraw on Image resize' TabOrder = 0 end object CheckBoxPanel: TCheckBox Left = 168 - Height = 22 + Height = 19 Top = 16 - Width = 160 + Width = 140 Caption = 'Redraw on Panel resize' TabOrder = 1 end object CheckBoxForm: TCheckBox Left = 168 - Height = 22 + Height = 19 Top = 32 - Width = 160 + Width = 139 Caption = 'Redraw on Form resize' TabOrder = 2 end diff --git a/examples/ReSizeImageDemo/unit1.pas b/examples/ReSizeImageDemo/unit1.pas index 8963dd929f..33e382b61f 100644 --- a/examples/ReSizeImageDemo/unit1.pas +++ b/examples/ReSizeImageDemo/unit1.pas @@ -13,7 +13,7 @@ unit Unit1; interface uses - {$ifdef Windows} Windows, {$Endif}SysUtils, Forms, Graphics, ExtCtrls, StdCtrls; + SysUtils, Forms, Graphics, ExtCtrls, StdCtrls; type diff --git a/examples/componentstreaming/mainunit.lfm b/examples/componentstreaming/mainunit.lfm index eba317f4e1..a6da08fc89 100644 --- a/examples/componentstreaming/mainunit.lfm +++ b/examples/componentstreaming/mainunit.lfm @@ -2,28 +2,32 @@ object CompStreamDemoForm: TCompStreamDemoForm Left = 292 Height = 485 Top = 168 - Width = 525 + Width = 568 HorzScrollBar.Page = 524 VertScrollBar.Page = 484 Caption = 'Streaming components example' ClientHeight = 485 - ClientWidth = 525 + ClientWidth = 568 OnCreate = FormCreate - LCLVersion = '0.9.29' + LCLVersion = '1.9.0.0' object Note1Label: TLabel - Left = 253 - Height = 16 + Left = 264 + Height = 128 Top = 27 - Width = 463 + Width = 288 + Anchors = [akTop, akLeft, akRight] + AutoSize = False Caption = 'This example demonstrates, how to stream a component to a stream in binary format ...' ParentColor = False WordWrap = True end object Note2Label: TLabel - Left = 265 - Height = 16 - Top = 325 - Width = 1269 + Left = 264 + Height = 161 + Top = 308 + Width = 290 + Anchors = [akTop, akLeft, akRight, akBottom] + AutoSize = False Caption = '... and how to reconstruct the component from a stream. This technique can be used to save components to disk or to transfer them via network. Of course this also works for your own classes as long as they are descendants of TComponent.' ParentColor = False WordWrap = True @@ -34,7 +38,7 @@ object CompStreamDemoForm: TCompStreamDemoForm Top = 25 Width = 195 Caption = 'Source' - ClientHeight = 72 + ClientHeight = 70 ClientWidth = 191 TabOrder = 0 object AGroupBox: TGroupBox @@ -68,17 +72,17 @@ object CompStreamDemoForm: TCompStreamDemoForm Left = 15 Height = 132 Top = 170 - Width = 496 + Width = 539 Anchors = [akTop, akLeft, akRight, akBottom] Caption = 'Stream (special characters are shown as hexnumbers)' - ClientHeight = 114 - ClientWidth = 492 + ClientHeight = 112 + ClientWidth = 535 TabOrder = 3 object StreamMemo: TMemo Left = 0 - Height = 95 + Height = 93 Top = 0 - Width = 492 + Width = 535 Align = alClient Lines.Strings = ( 'First click on the button above, then on button below' @@ -89,8 +93,8 @@ object CompStreamDemoForm: TCompStreamDemoForm object StreamAsLFMCheckBox: TCheckBox Left = 0 Height = 19 - Top = 95 - Width = 492 + Top = 93 + Width = 535 Align = alBottom Caption = 'Show stream in LFM format (text)' OnChange = StreamAsLFMCheckBoxChange diff --git a/examples/dbeditmask/Unit1.lfm b/examples/dbeditmask/Unit1.lfm index 50b68a4a96..fef5f178c7 100644 --- a/examples/dbeditmask/Unit1.lfm +++ b/examples/dbeditmask/Unit1.lfm @@ -8,16 +8,14 @@ object Form1: TForm1 Caption = 'Test DBEdit with mask' ClientHeight = 443 ClientWidth = 515 - Font.Height = -11 - Font.Name = 'MS Sans Serif' OnCreate = FormCreate Position = poScreenCenter LCLVersion = '1.9.0.0' object Label3: TLabel Left = 8 - Height = 13 + Height = 15 Top = 16 - Width = 163 + Width = 171 Caption = 'ADate Field - Mask: !99/99/00;1;_' ParentColor = False end @@ -68,7 +66,7 @@ object Form1: TForm1 end object DateEdit: TDBEdit Left = 8 - Height = 19 + Height = 23 Top = 32 Width = 246 CustomEditMask = True @@ -81,16 +79,16 @@ object Form1: TForm1 end object ShowLongDateCheckBox: TCheckBox Left = 270 - Height = 21 + Height = 19 Top = 32 - Width = 112 + Width = 98 Caption = 'Show Full Date' OnChange = ShowLongDateCheckBoxChange TabOrder = 3 end object IntEdit: TDBEdit Left = 8 - Height = 19 + Height = 23 Top = 80 Width = 246 CustomEditMask = True @@ -103,15 +101,15 @@ object Form1: TForm1 end object Label1: TLabel Left = 8 - Height = 13 + Height = 15 Top = 64 - Width = 51 + Width = 50 Caption = 'AInt Field' ParentColor = False end object DBEdit1: TDBEdit Left = 271 - Height = 19 + Height = 23 Top = 80 Width = 193 CustomEditMask = True @@ -124,9 +122,9 @@ object Form1: TForm1 end object Label2: TLabel Left = 270 - Height = 13 + Height = 15 Top = 64 - Width = 100 + Width = 95 Caption = 'AStr Field (Phone)' ParentColor = False end diff --git a/examples/dbeditmask/Unit1.pas b/examples/dbeditmask/Unit1.pas index fd173fa2f4..4408c1955c 100644 --- a/examples/dbeditmask/Unit1.pas +++ b/examples/dbeditmask/Unit1.pas @@ -53,6 +53,7 @@ uses procedure TForm1.FormCreate(Sender: TObject); begin DefaultFormatSettings.ShortDateFormat := 'd/m/yyyy'; + DefaultFormatSettings.DateSeparator := '/'; if not FileExistsUTF8(Dbf1.TableName) then begin Dbf1.FieldDefs.Clear; diff --git a/examples/dbeditmask/project1.lpi b/examples/dbeditmask/project1.lpi index 678c8be6db..eb2f13943a 100644 --- a/examples/dbeditmask/project1.lpi +++ b/examples/dbeditmask/project1.lpi @@ -59,7 +59,7 @@ </Target> <SearchPaths> <IncludeFiles Value="$(ProjOutDir)"/> - <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> + <UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/> </SearchPaths> <Parsing> <SyntaxOptions> diff --git a/examples/dbeditmask/project1.res b/examples/dbeditmask/project1.res index bc23f8c77ed575e1c5a54800e9b3941dbf133309..0ad004b9d97928b9d3a42fa745f31fc0da4dfdb5 100644 GIT binary patch delta 46 zcmey#^O<*o0^{b5iso#SkFYvP8k*^cXXd5kmlp@8mXu`Xr57vN@p36BC``6wa{vH? CXAbKC delta 16 Xcmey&`;%va0;A<dMRT^vm)H~mH7*5< diff --git a/examples/synedit1.pas b/examples/synedit1.pas index 019fef0873..c22e700df0 100644 --- a/examples/synedit1.pas +++ b/examples/synedit1.pas @@ -23,7 +23,7 @@ program synedit1; {$mode objfpc}{$H+} uses - Classes, LazUTF8, Forms, Graphics, SynEdit, SynHighlighterPas; + Classes, LazUTF8, Forms, Graphics, Interfaces, SynEdit, SynHighlighterPas; type TForm1 = class(TForm) diff --git a/examples/treeview/tv_add_remove.lpi b/examples/treeview/tv_add_remove.lpi index 49457bcbc5..804890a768 100644 --- a/examples/treeview/tv_add_remove.lpi +++ b/examples/treeview/tv_add_remove.lpi @@ -53,7 +53,7 @@ <Filename Value="TV_Add_Remove"/> </Target> <SearchPaths> - <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> + <UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/> </SearchPaths> <Linking> <Options> diff --git a/examples/treeview/tv_add_remove_u1.lfm b/examples/treeview/tv_add_remove_u1.lfm index bb334c4a79..7508f09ddf 100644 --- a/examples/treeview/tv_add_remove_u1.lfm +++ b/examples/treeview/tv_add_remove_u1.lfm @@ -7,19 +7,15 @@ object Form1: TForm1 Caption = 'TreeView Example 1' ClientHeight = 427 ClientWidth = 455 - Font.Height = -11 - Font.Name = 'MS Sans Serif' - LCLVersion = '0.9.27' + LCLVersion = '1.9.0.0' object tv_eg1: TTreeView Left = 0 Height = 427 Top = 0 Width = 196 Align = alLeft - DefaultItemHeight = 14 HideSelection = False Indent = 19 - ParentCtl3D = False ReadOnly = True TabOrder = 0 Options = [tvoAutoItemHeight, tvoKeepCollapsedNodes, tvoReadOnly, tvoShowButtons, tvoShowLines, tvoShowRoot, tvoToolTips]