GTK3: TForm.Constraints.MaxHeight / MinHeight does not work
* Lazarus/FPC Version: Lazarus 4.99 (rev main_4_99-3599-g628dd90e16) FPC 3.2.2 x86_64-linux-gtk3
* Operating System: Manjaro Linux + KDE, X11 (no Wayland)
* CPU / Bitness: 64 Bits
## What happens
Setting TForm.Constraints.MaxHeight or MinHeight does nothing.
## What did you expect
Like with other widgetsets, restrict the height.
## Steps to reproduce
In the attached project, click the button. Nothing happens.
<BR>The project has build modes also for GTK2 and QT6. They set the constraint correctly.
<BR>Uncommenting the line setting ClientHeight sets the Height correctly also with GTK3.
This issue is inspired by Lazarus IDE MainBar height calculation. I have added there `{$IFnDEF LCLGtk3}` to prevent the constraint being set. Unlike in the example project, the IDE MainBar height calculation goes totally wrong with the constraint. So, the constraint do **something** there.
<BR>Adding `DebugLn()` to see the calculated height in IDE MainBar leads to an Assertion failure because the height goes negative.
<BR>I include a patch here for testing it. `DebugLn()` should not affect the calculation but somehow it does.
[0001-Debug-MainBar.patch](/uploads/593083487992eb605f51faf763aa0f0f/0001-Debug-MainBar.patch)
An example project.
[GTK3ConstraintProject.zip](/uploads/7de9b87f1373b42cbbce0d0eb583c03e/GTK3ConstraintProject.zip)
Anyway, the temporary `{$IFnDEF LCLGtk3}` in MainBar code makes the IDE usable also without AnchorDocking. With AnchorDocking it is already usable.
People should test and created **detailed** bug reports.
issue