Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Feature Request Display current width & height

Discussion in 'UI Toolkit' started by Hellfim, May 28, 2023.

  1. Hellfim

    Hellfim

    Joined:
    Sep 11, 2014
    Posts:
    92
    Would be very handy if current width & height were displayed alongside other flex-parameters.

    Something like red text in the attached screenshot
     

    Attached Files:

    stefania_unity and ElevenArt like this.
  2. stefania_unity

    stefania_unity

    Unity Technologies

    Joined:
    Jan 27, 2021
    Posts:
    12
    Thanks for the feedback @Hellfim ! This is something we've been looking into lately and hope to work on soon.

    To clarify, when you say "current width & height", are you referring specifically to the resolved pixel values? Since many properties can drive an element's width and height (pixel vs percentage, if flex is applicable, auto size, etc.) it's helpful to get feedback about what you'd expect to see.
     
  3. Hellfim

    Hellfim

    Joined:
    Sep 11, 2014
    Posts:
    92
    I personally would prefer to see value in px, meaning if any flex params (percentage, offset, auto-size, etc) are applied I would see exact value in px for the element inside _current_ container.

    Although it might also be convinient to make these displayed values a togglable button like ones to the left, but UNLIKE ones to the left they wouldn't change flex-params, but rather just change display style.

    For example if we are speaking about my screenshot at the top:
    If you see (160x30)px you can click on it and have it display (41x100)%, click again and it displays (160x30) px again.
     
    Last edited: May 29, 2023
    ElevenArt likes this.
  4. ElevenArt

    ElevenArt

    Joined:
    Dec 12, 2012
    Posts:
    16
    A useful idea. It would be nice to be able to display the current size of the element in both pixels and percentages.