Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

Adjusting the element to the grid

How to correctly adjust the dynamic dimensions of an element to existing window dimensions?

Situation:

  • grid occupies some part of the entire window
  • in the middle, we draw an element, where we give the height and width of the elements and can be other dimensions
  • I would like to keep the element filling the maximum indicated field while maintaining the ratio of dimensions

Previously, I was doing functions that took parent dimensions and each dimension analyzed by a separate function, but this dramatically slows down graphics rendering

enter image description here

Comments