View Issue Details

IDProjectCategoryView StatusLast Update
0016202LazarusLCLpublic2010-04-16 21:51
ReporterFlávio Etrusco Assigned ToMattias Gaertner  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version0.9.29 (SVN) 
Fixed in Version0.9.29 (SVN) 
Summary0016202: AutoSized panels ignore InnerBorder (NewAutoSize)
DescriptionActually, Right and Bottom borders of "bottom-most" and "right-most" children controls are ignored until you change Parent's border (changing InnerBorder trigger the realign, but it's own value is ignored).
TagsNo tags attached.
Fixed in Revision
LazTarget-
WidgetsetGTK 2
Attached Files

Relationships

child of 0016013 closedMattias Gaertner New AutoSize/AutoSizing bugs (meta-bug) 

Activities

Mattias Gaertner

2010-04-05 22:26

manager   ~0036471

Maybe you misunderstood InnerBorder, which is probably the fault of the wrong documentation. I updated the docs about InnerBorder:

Amount of pixel added to the widgetset's preferred size

When calculating the preferred size of control, the LCL asks first the widgetset. For controls like TButton the widgetset can return a preferred size. The InnerBorder is added twice to this size. If the widgetset does not return a preferred size, the InnerBorder is not used.


Otherwise: Can you provide a small example?

Flávio Etrusco

2010-04-06 09:26

developer   ~0036482

I definitely should have explained it better :-$
Steps:
1) Add one panel to the form.
2) Add two buttons inside the panel.
3) Enable AutoSize in the panel.
4) Change the panel BorderSpacing.InnerBorder.
I would expect the panel size to change. Should I?

The issue with Right and Bottom borders of children (the buttons) was already solved by the latest fixes to AutoSize.

Flávio Etrusco

2010-04-06 10:06

developer   ~0036484

Spoke too soon. Right and Bottom borders still don't trigger an immediate resize sometimes.
The InnerBorder seems to not apply to AutoSize/internal controls? Setting a large enough value I can make the Height change (apparently to 2*InnerBorder).

Mattias Gaertner

2010-04-06 10:32

manager   ~0036486

InnerBorder has no effect for TPanel.

Maybe you are searching for ChildSizing.LeftTopSpacing?

Flávio Etrusco

2010-04-06 11:56

developer   ~0036494

Well, that works. But what's the purpose of (and what controls use) InnerBorder?
Won't LeftTopSpacing affect spacing between the childcontrols?

Mattias Gaertner

2010-04-06 13:20

manager   ~0036495

No LCL control uses InnerBorder. You can use it to make TButtons bigger than normal.

Spacing between child controls: ChildSizing.HorizontalSpacing

Flávio Etrusco

2010-04-06 17:25

developer   ~0036497

Last edited: 2010-04-07 07:39

Thanks, the Spacing naming makes sense now. (Out of curiosity, why are the values tied together - TopLeft vs Top+Left -?)
InnerBorder still doesn't make lot of sense, though. I can't follow why 'Around' applies and 'InnerBorder' doesn't. BTW, where can I find updated documentation? http://www.freepascal.org/docs-html/lcl/controls/tcontrolborderspacing.html doesn't even mention InnerBorder. Thinking better, since it has a different naming scheme (xxxBorder) one can suspect it's a different thing. But then it could be called something else, like ComponentBorder. And make the value be reset automatically when it's not supported.
Also, can you reproduce the bug with setting a big InnerBorder in TPanel?

Mattias Gaertner

2010-04-08 19:54

manager   ~0036555

InnerBorder is now always added. Unless a control overrides CalculatePreferredSize.

Issue History

Date Modified Username Field Change
2010-04-05 12:02 Flávio Etrusco New Issue
2010-04-05 12:02 Flávio Etrusco LazTarget => -
2010-04-05 12:02 Flávio Etrusco Widgetset => GTK 2
2010-04-05 12:03 Flávio Etrusco Relationship added child of 0016013
2010-04-05 22:26 Mattias Gaertner Note Added: 0036471
2010-04-05 22:26 Mattias Gaertner Assigned To => Mattias Gaertner
2010-04-05 22:26 Mattias Gaertner Status new => feedback
2010-04-06 09:26 Flávio Etrusco Note Added: 0036482
2010-04-06 09:26 Flávio Etrusco Status feedback => assigned
2010-04-06 09:29 Flávio Etrusco Summary AutoSize'd groupboxes ignore InnerBorder and ChildControls borders with NewAutoSize => AutoSized panels ignore InnerBorder (NewAutoSize)
2010-04-06 10:06 Flávio Etrusco Note Added: 0036484
2010-04-06 10:32 Mattias Gaertner Note Added: 0036486
2010-04-06 11:56 Flávio Etrusco Note Added: 0036494
2010-04-06 13:20 Mattias Gaertner Note Added: 0036495
2010-04-06 17:25 Flávio Etrusco Note Added: 0036497
2010-04-06 17:26 Flávio Etrusco Note Edited: 0036497
2010-04-06 17:29 Flávio Etrusco Note Edited: 0036497
2010-04-07 07:39 Flávio Etrusco Note Edited: 0036497
2010-04-08 19:54 Mattias Gaertner Note Added: 0036555
2010-04-08 19:54 Mattias Gaertner Status assigned => resolved
2010-04-08 19:54 Mattias Gaertner Resolution open => fixed
2010-04-16 21:51 Flávio Etrusco Status resolved => closed
2010-04-16 21:51 Flávio Etrusco Fixed in Version => 0.9.29 (SVN)