Sign in Join
Wiki copytemporary

Lazarus 1.8.0 release notes: what changed

Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.

Title: Lazarus 1.8.0 release notes

OldNewLine
1+Statistics:
2+
3+1. commits: 3980
4+2. log: svn log -r 50542:56591 (https://svn.freepascal.org/svn/lazarus/branches/fixes_1_8)
5+
6+Fixes branch: [[Lazarus 1.8 fixes branch]]
7+
8+# LCL Interfaces Changes
9+
10+- [[Qt5 Interface|Qt5]]: new widgetset based on Qt5 libraries.
11+
12+# LCL Changes
13+
14+- [[TApplication]]
15+ - Scaled property: the LCL is DPI-aware. Please see [[High DPI]] for more information.
16+
17+- [[TCustomForm]]
18+ - new position poWorkAreaCenter - center form on working area (depends on DefaultMonitor)
19+ - new compiler define LCLRealFormBounds. If you compile your application with LCLRealFormBounds on, the TCustomForm bounds (Width/Height) will be real outer bounds and not client bounds. Also constraints will affect real bounds. For now, it is supported only by win32.
20+ - Scaled property: the LCL is DPI-aware. Please see [[High DPI]] for more information.
21+
22+- TImage
23+ - new event OnPaintBackground.
24+ - new properties StretchInEnabled, StretchOutEnabled.
25+ - new properties KeepOriginXWhenClipped, KeepOriginYWhenClipped.
26+
27+- TTreeView
28+ - implemented Tooltips property.
29+ - implemented MultiSelectStyle property.
30+
31+- [[TToolButton]]
32+ - new style tbsButtonDrop - paints a drop down arrow on the right side of the button. In contrast to tbsDropDown the button has only single clicking area that invokes the DropDownMenu if assigned.
33+ - new event OnArrowClick. It is called if Style=tbsDropDown when the user clicks the arrow button area of toolbutton. Breaking change: In 1.6. the OnClick event was called for this!
34+
35+- [[TToolBar]]
36+ - new DropDownWidth property to setup the width of the toolbutton arrow area for Style=tbsDropDown.
37+
38+- ClipBoard
39+ - The ClipBoard now supports copying and pasting text in HTML format by means of the methods GetAsHtml and SetAsHtml.
40+
41+- Menus ([[TPopupMenu]], [[TMainMenu]], [[TMenuItem]])
42+ - Menus now support OwnerDraw with (almost) Delphi's approach. If you set TMenu.OwnerDraw to true the OnMeasureItem and OnDrawItem from TMenu and TMenuItem will be called. OnDrawItem from Lazarus has the same parameters as OnAdvancedDrawItem from Delphi. You can use the events also from TMenu, which is an LCL addition to Delphi. For now only win32 is supported.
43+
44+- Dialogs
45+ - [[TTaskDialog]] added
46+
47+- [[TDateTimePicker]]
48+ - new [[DateTimeCtrls Package|TDateTimePicker.Options]] property
49+
50+# IDE Changes
51+
52+- [[lazbuild]]
53+ - new option --add-package-link to register given lpk files without building.
54+
55+- [[Lazarus IDE Tools|Quick Fixes]]
56+ - new QuickFix for any fpc hint, note or warning: add compiler directive {\$warn id off}
57+
58+- [[Lazarus IDE Tools|Code creation]]
59+ - new shortcut <span class="kbd">Ctrl</span>+<span class="kbd">Shift</span>+<span class="kbd">X</span> that shows a CodeCreation dialog with more options. <span class="kbd">Ctrl</span>+<span class="kbd">Shift</span>+<span class="kbd">C</span> never shows a dialog now.
60+ - You can choose the default visibility of the methods in Tools / Options / Codetools / Class Completion / Default section of methods.
61+
62+- Word+Identifier completion: If the option Codetools / Identifier Completion / Replace whole words is enabled, pressing Return replaces the whole word at cursor, pressing Shift+Return replaces only the left side. If the option is disabled it works the other way round: Return replaces left side, Shift+Return replaces whole word.
63+
64+- "case ofall" code template indentation change
65+ - Old behavior: the created case-list was always flat
66+ - New behavior: by default it is now indented according to source editor options.
67+ - Reason: the indented case-list is Delphi-standard
68+ - Remedy: edit the ofall template and use the WithoutExtraIndent parameter: "\$OfAll(WithoutExtraIndent)"
69+
70+- Ctrl-Enter alias "Open file at cursor" was improved when cursor in a Pascal file: It now recognizes properly \$I and \$R directives, uses nodes, string literals and comments.
71+
72+- DPI awareness: the IDE is DPI-aware (it's ongoing work, so expect issues). Please see [[High DPI]] for more information.
73+
74+- pas2js support:
75+ - parsing the external class declaration of pas2js, code completion, find declaration, etc.
76+ - namespaces: The IDE supports the -NS option and project default name spaces of Delphi/pas2js. As soon as FPC supports namespaces Lazarus supports it too.
77+
78+- Editor
79+ - New [[Lazarus IDE Tools|colored outline of source structure]]. (like cnpack, if then block outline)
80+
81+- Support for Win98/WinNT has been dropped.
82+
83+# IDE Interfaces Changes
84+
85+- New function LazarusIDE.FindUnitsOfOwner listing all units of a project/package. [1](http://wiki.lazarus.freepascal.org/Extending_the_IDE#All_units_of_current_project)
86+
87+# Components
88+
89+## LazControls
90+
91+- Added [[TSpinEditEx]] and [[TFloatSpinEditEx]] a widgetset independant implementation of [[TSpinEdit]] resp. [[TFloatSpinEdit]] with some extended capabilities:
92+ - NullValue property.
93+ - Configurable behaviour when the text inside the control is not a number.
94+
95+## ToDoListLaz
96+
97+- Now searches all used units of projects. Excluding used packages, including all units listed in the project inspector.
98+
99+## [[TAChart]]
100+
101+- New component [[TAChart documentation|TChartCombobox]]
102+- Improved data point tools (property Target)
103+- New demos (runtime demos, datapointtools)
104+
105+## EditorToolbar
106+
107+- The package editortoolbar.lpk is removed and its functionality is integrated in IDE.
108+ - The settings can be found in Tools -\> Options -\> Environment -\> Editor Toolbar
109+
110+# Changes affecting compatibility
111+
112+## LazUtils
113+
114+### Wrappers for string functions are disabled
115+
116+Various units in LCL, LazUtils and Codetools have wrappers for string functions in LazUTF8 and LazFileUtils. They are now disabled. They can still be enabled by defining "EnableWrapperFunctions".
117+
118+The wrapper functions were already deprecated in Lazarus 1.6 with a proper hint about where to find the actual function. This allowed a transition period for everybody who updates to every major Lazarus version.
119+
120+### FindDefaultExecutablePath searches on Windows in BaseDir
121+
122+- Applies: Non Unix systems.
123+- Old behavior: BaseDir was only searched if '.' was in %PATH% - same as Unix shells.
124+- New behavior: BaseDir is always searched (if set) on non Unix.
125+- Reason: Windows console searches in current directory so Windows users expect to find executable in base directory.
126+- Remedy: Use instead SearchFileInPath(Executable,BaseDir,GetEnvironmentVariableUTF8('PATH'),PathSeparator,\[sffDontSearchInBasePath\]);
127+
128+## LCL incompatibilities
129+
130+### 1.8.4: TToolBar children ignore Align
131+
132+Controls placed within TToolBar cannot be aligned with the Align property.
133+
134+- Old behavior: The Align property of TToolBar children was taken into account.
135+- New behavior: The Align property is ignored.
136+- Reason: It caused endless alignment loops when the control's size was changed by code in Create.
137+- Remedy: use a parent container for TToolBar and align the controls within this container.
138+
139+### TLCLPlatform definition was moved
140+
141+TLCLPlatform was moved from InterfaceBase to a new LCLPlatformDef unit in r53711. Also a related LCLPlatformDisplayNames was moved from LazConf to the same unit.
142+
143+- Old behavior: Unit InterfaceBase was used for TLCLPlatform type.
144+- New behavior: Unit LCLPlatformDef must be used for it. InterfaceBase may still be needed for other types.
145+- Reason: The GUI independent parts of LCL definitions will be needed for command line programs (LazBuild).
146+- Remedy: use the right units in your uses-sections.
147+
148+### TToolButton.OnArrowClick added
149+
150+- Applies: event called if Style=tbsDropDown when the user clicks the arrow button area of toolbutton.
151+- Old behavior: OnClick was called.
152+- New behavior: OnArrowClick is called.
153+- Reason: there was no easy way to detect click on the arrow sub-button.
154+- Remedy: use the same event handler for OnArrowClick and OnClick.
155+
156+### TCustomAbstractGroupedEdit descendants must override GetRealText/SetRealText methods
157+
158+- Old behavior: TCustomAbstractGroupedEdit reintroduced the Text property
159+- New behavior: TCustomAbstractGroupedEdit uses TControl.Text
160+- Reason: unnecessary 2 different properties with the same name and function
161+- Remedy: override GetRealText/SetRealText instead of GetText/SetText.
162+
163+### TFontStyle enum item order is changed to match with Delphi
164+
165+- Old behavior: the last item was fsUnderline
166+- New behavior: the last item is fsStrikeOut
167+- Reason: Delphi compatibility.
168+- Remedy: check code if it depends on Ord(TFontStyle) - like "StyleStrings: Array\[TFontStyle\] of string = ('Bold', 'Italic','StrikeOut','Underline');" or saving/retrieving font style as ordinal value.
169+- More info: It does not affect LFM streaming. It can make a difference when iterating items.
170+
171+### THintWindow transparent for mouse messages by default
172+
173+- Old behavior: [[THintWindow]] received mouse messages
174+- New behavior: [[THintWindow]] passes mouse message through itself to the underlying form/control.
175+- Reason: Delphi compatibility.
176+- Remedy: to make [[THintWindow]] clickable again, add a LM_NCHITTEST message handler to your hint window descendant and return HTCLIENT as message result:
177+
178+``` pascal
179+ procedure WMNCHitTest(var Message: TLMessage); message LM_NCHITTEST;
180+ // ...
181+ procedure TMyHintWindow.WMNCHitTest(var Message: TLMessage);
182+ begin
183+ Message.Result := HTCLIENT;
184+ end;
185+```
186+
187+### TCustomTabControl setting TabIndex or PageIndex by code
188+
189+- Old behavior: setting TabIndex or PageIndex by code caused an OnChange event to be fired
190+- New behavior: setting TabIndex or PageIndex by code no longer causes an OnChange to be fired
191+- Reason: Delphi compatibility.
192+- Remedy: set nboDoChangeOnSetIndex in Options (this option is not available in Delphi), call OnChange in you own code when changing TabIndex/PageIndex, or move the code in OnChange to another event if applicable.
193+
194+### TCustomControlFilterEdit.UseFormActivate deprecated
195+
196+- Old behavior: setting UseFormActivate to true, the filter edit got focus on Form.Activate
197+- New behavior: UseFormActivate does nothing and will be removed after 1.8
198+- Reason: it globally misused the TForm.OnActivate event.
199+- Remedy: set ActiveControl in Form.DoCreate or use correct TabOrder or similar.
200+
201+### DPI value change for all Mac OSX widget sets
202+
203+- Old behavior: all DPI/PPI properties had value of 72 on all Mac OSX widget sets.
204+- New behavior: Screen.PixelsPerInch and TMonitor.PixelsPerInch change values from 72 to 96 on Mac. The value of GetDeviceCaps(MyDC, LOGPIXELSX) still returns 72.
205+- Reason: 100% scaling on Windows and Linux system is 96 DPI. If Mac uses 72 DPI for 100% the following points are a problem:
206+ - the Font.Height / Font.Size ratio is different from Win/Linux. (Setting Font.Size := 10 results in different font height on Mac and Win/Linux.)
207+ - automatic LCL High-DPI methods scale controls down on Mac.
208+- Remedy: If you develop applications for the Mac, check your code for any "Font.Size := ValueGreaterThanZero" assignments. You have to adjust them in ratio 72/96 to receive the same font height as for LCL 1.6. E.g. "Font.Size := 12" has to be changed to "Font.Size := 9". Font.Height assignments don't need to be adjusted.
209+
210+### TDateTimePicker.OnCheckBoxChange Sender parameter change
211+
212+- Old behavior: Sender was the TCheckBox object within TDateTimePicker
213+- New behavior: Sender is the TDateTimePicker object
214+- Reason: Do not expose private field TCheckBox to public methods.
215+- Remedy: If you need the TCheckBox object in OnCheckBoxChange handler, you can get it from the Controls array property.
216+
217+### PCheckComboItemState not found
218+
219+- Old behavior: TCustomCheckCombo Items.Objects\[\] were PCheckComboItemState
220+- New behavior: TCustomCheckCombo Items.Objects\[\] are now TCheckComboItemState
221+- Reason: when Items.Objects\[\] was accidentally overwritten or an item was added wrong, there was a crash, even possible X freeze. Now it checks for such a mistake and creates a normal exception.
222+- Remedy: Use TCustomCheckCombo instead.
223+
224+## Components incompatibilities
225+
226+### easylazfreetype: TCustomFreeTypeFontCollection.AddFile
227+
228+- Old behavior: return Boolean
229+- New behavior: return TCustomFontCollectionItem
230+- Reason: there was no easy possiblity to work with the added item.
231+- Remedy: don't check the result for True, but for "\<\>nil".
232+
233+## IDE incompatibilities
234+
235+### Form resource strings table LRT format support is dropped, LRJ format introduced instead
236+
237+- Old behavior: Form resource strings were extracted into LRT file when saving form.
238+- New behavior: Form resource strings are extracted into LRJ file with format unified with RSJ files which are emitted by FPC 3.0.0 and up. LRT support is dropped.
239+- Reason: LRT file format was broken by design, e.g. it didn't handle multiline captions properly (see bug 26553 for details).
240+- Remedy: Open your project and click "Project" -\> "Resave forms with enabled i18n" menu item, then rebuild your project. After this you can safely remove LRT files.
241+
242+## DateTimeCtrls
243+
244+### DateTimeCtrls split into DateTimeCtrls and DateTimeCtrlsDsgn packages
245+
246+- Old: one run/design time package DateTimeCtrls
247+- New: runtime package=DateTimeCtrls, designtime package=DateTimeCtrlsDsgn
248+- Reason: Consistency, separate run and design time code
249+- Remedy: DateTimeCtrls components get unregistered. You have to install DateTimeCtrlsDsgn into the IDE.
250+- Info: Don't link DateTimeCtrlsDsgn into your application.
251+
252+## LazControls
253+
254+### Register procedures moved into LazControlDsgn package
255+
256+- Old: register procedures were in the LazControls package although there was a LazControlDsgn package
257+- New: moved register procedures into LazControlDsgn package
258+- Reason: Consistency, separate run and design time code
259+- Remedy: the components get unregistered. You have to install LazControlDsgn into the IDE.
260+- Info: LazControlDsgn is a [[Lazarus Packages|designtime]] package.
261+
262+# Previous release notes
263+
264+- [[Lazarus 1.6.0 release notes]]
265+- [[Lazarus 1.4.0 release notes]]
266+- [[Lazarus 1.2.0 release notes]]
267+- [[Lazarus 1.0 release notes]]
268+
269+---
270+*From the Free Pascal wiki, page "Lazarus 1.8.0 release notes", as it stood on 2020-08-22 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*
271+Category: Lazarus
272+Category: Release Notes

Back to history