mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-09 08:47:59 +02:00
IDE: fixed crash when componentpalette width too small
git-svn-id: trunk@13174 -
This commit is contained in:
parent
b60ad6ee51
commit
31ca6d4fa8
@ -442,6 +442,7 @@ begin
|
||||
ButtonX:= ((ComponentPaletteBtnWidth*3) div 2) + 2;
|
||||
|
||||
MaxBtnPerRow:=((Page.ClientWidth - ButtonX) div ComponentPaletteBtnWidth);
|
||||
if MaxBtnPerRow<1 then MaxBtnPerRow:=1;
|
||||
Rows:=((ButtonCount-1) div MaxBtnPerRow)+1;
|
||||
//DebugLn(['TComponentPalette.ReAlignButtons ',DbgSName(Page),' PageIndex=',Page.PageIndex,' ClientRect=',dbgs(Page.ClientRect)]);
|
||||
// automatically set optimal row count and re-position controls to use height optimally
|
||||
|
Loading…
Reference in New Issue
Block a user