~eliasnaur/gio#110: 
How set an "Z-Index" using lists?

Looking all examples, which uses lists, the list can be just one single element. How can two (or more) elements in the "same space"?

I think about an alternative to fix https://todo.sr.ht/~eliasnaur/gio/109, which is not good, but works. That solution is to create one transparent-image with the shadows, then put it on top of the element (and another content above the shadow).

Maybe can be done using the constraints and dimensions but how? How I can create an element and others elements on top of that? It's possible to single set an "position" which you want the content to be? Relative of some parent element.

Status
REPORTED
Submitter
~inkeliz
Assigned to
No-one
Submitted
4 months ago
Updated
4 months ago
Labels
No labels applied.

~eliasnaur 4 months ago

Please use the mailing list for questions:

https://lists.sr.ht/~eliasnaur/gio


On Wed May 6, 2020 at 08:16, ~inkeliz wrote:

Looking all examples, which uses lists, the list can be just one single element. How can two (or more) elements in the "same space"?

I think about an alternative to fix https://todo.sr.ht/~eliasnaur/gio/109, which is not good, but works. That solution is to create one transparent-image with the shadows, then put it on top of the element (and another content above the shadow).

Maybe can be done using the constraints and dimensions but how? How I can create an element and others elements on top of that? It's possible to single set an "position" which you want the content to be? Relative of some parent element.

Positioning and z-ordering is what the layout package does. For example, take a look at layout.Stack,

https://git.sr.ht/~eliasnaur/gio/tree/master/layout/stack.go#L46

Note the use of op.MacroOp for recording and replaying operations, and op.StackOp for saving and restoring the operation state (transformation, color, clip etc.).

~inkeliz 4 months ago

Sorry for use the wrong place for question, ~eliasnaur. But thank you for quick reply. (:

Register here or Log in to comment, or comment via email.