~eliasnaur/gio

2 2

Flexed without forcing space

Details
Message ID
<CXQ4301LBX35.3W02889MDVV2A@disroot.org>
DKIM signature
missing
Download raw message
Hi, is it possible in Gio to make a Flex that takes up all of the available
space, but without forcing descendant flex children to take up all the space?
My usecase is to make buttons at the complete end of the window.

Thanks.
Details
Message ID
<7e75eb8948cfe6597c26518e4860c8c1@disroot.org>
In-Reply-To
<CXQ4301LBX35.3W02889MDVV2A@disroot.org> (view parent)
DKIM signature
missing
Download raw message
This works for me:

     layout.Flexed(1, func(gtx C) D {
         return layout.Dimensions{
             Size: image.Point{X: gtx.Constraints.Max.X, Y: 
gtx.Constraints.Max.Y},
         }
     })
Details
Message ID
<CAFcc3FR_7HhTmqMaQB0vHVbP5=XWO7rX7UEF2M6WH+f9HF1Uzw@mail.gmail.com>
In-Reply-To
<7e75eb8948cfe6597c26518e4860c8c1@disroot.org> (view parent)
DKIM signature
missing
Download raw message
> This works for me:
>
>      layout.Flexed(1, func(gtx C) D {
>          return layout.Dimensions{
>              Size: image.Point{X: gtx.Constraints.Max.X, Y:
> gtx.Constraints.Max.Y},
>          }
>      })

I'm not totally sure that I understand your description of the
problem, but if you found a solution that works for you, excellent!

Cheers,
Chris
Reply to thread Export thread (mbox)