After few hours searching in IDE codes, I found the way to increase IDE mainform's Constraint.MaxHeight.It is required for showing buttons in Component Palette shown in multiple row.And it works.
I mean my aesthetic expectation/calculation is also perfect in multi-row mode.
My aesthetic philosophy of how component button's position is simple:
* Keep the Arrow/SelectButton in home, it should never go anywhere when scrollbox is scrolled.
* All buttons in component palette should be
center-aligned-vertically when in single row.
It is default behavior, since current Lazarus allow only single row.
it is the final-touch of aesthetic aspect: vertical margin distributed equally (margin top = margin bottom).
So, While Lazarus should never show component button in multiple row by design,
The button will always shown centered vertically (not top aligned as in current release)
But, In case Lazarus could show component buttons in multirow (as my experiment), the additional rules is follow:
* All buttons should
reflect to Top align in multi-row mode. This decision is better (in aesthetic perspective) instead of vertically-center.
> when there is too large space available. Too large := ScrollBox.Height >= ButtonHeight * 2
> When there is too small space available. Too small := ScrollBox.Height < ButtonHeight;
Otherwise (if single row or assumed as single row), vertical-center alignment shall be performed.
--------
But, you know we are in early stage of such improvement.
I cant guarantee that my solution is free from bug.
For instance, I found aesthetic bug from my prior patch:
The arrow-button is sometime not in it home when IDE form is resized. It shall always there anytime.
But, it is easy to see the arrow-button again:
click the Vertical-scrollbar to trigger the ScrollBox.ScrollBy event which is the procedure to keep the arrow button to be always visible after scrolled up/down.
-----------
What do you think ?