This is a problem in my app, because it leads to ugly gaps at inappropriate places that I can't prevent. This is somewhat related to #5777, but there's more to it than that. The padding situation with GroupBox and how it's supposed to be tamed currently just seems chaotic.
The padding surely shouldn't be unevenly distributed around the four sides.
And it surely should be possible to use GroupBox with or without another ...Box inside that may bring its own padding with it. In both of these cases, the distance between the title and the @children should also be the same.
Perhaps, GroupBox should have just a padding-top property that's for the gap above the title, and an inner-padding property that's for encompassing its @children below the title.
EDIT: Also, is there supposed to be a horizontal indent on the left between the title and the @children? When I use a ...Box inside, the ...Box's padding makes for an indent in the GroupBox, and I tend to find that suitable. If this should be avoided according to your design specifications, this would need to be documented.
Hi thank you for your report. I see you're problem and you're right, this make it difficult to use the GroupBox in some cases. So I see here the following action points:
Make padding and spacing public available to it can be overwritten from outside.
Improve the default padding and spacing on the GroupBox
I'm using the Fluent theme, because I'm on Windows.
This SlintPad example shows
GroupBox
's padding: none at the sides, some at the bottom and excessively much at the top.VerticalBox
's padding.VerticalBox
in aGroupBox
.This is a problem in my app, because it leads to ugly gaps at inappropriate places that I can't prevent. This is somewhat related to #5777, but there's more to it than that. The padding situation with
GroupBox
and how it's supposed to be tamed currently just seems chaotic.GroupBox
with or without another...Box
inside that may bring its own padding with it. In both of these cases, the distance between thetitle
and the@children
should also be the same.Perhaps,
GroupBox
should have just apadding-top
property that's for the gap above thetitle
, and aninner-padding
property that's for encompassing its@children
below thetitle
.EDIT: Also, is there supposed to be a horizontal indent on the left between the
title
and the@children
? When I use a...Box
inside, the...Box
'spadding
makes for an indent in theGroupBox
, and I tend to find that suitable. If this should be avoided according to your design specifications, this would need to be documented.