UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Where to set the main resolution of the Ubuntu Touch for a specific mobile model?

    Scheduled Pinned Locked Moved Unsolved Support
    7 Posts 2 Posters 444 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
      Reply
      • Reply as topic
      Log in to reply
      This topic has been deleted. Only users with topic management privileges can see it.
      • I Offline
        iqrajaved
        last edited by

        Hi everyone,

        I am working with Lomiri UI repo to do some custom changes to the UI, I am checking my changes using the CLICKABLE command on my dev environment. The things look different when I port them to mobile in terms of sizes.
        I am working with Redmi Note 9 pro. How can I set the resolution of this model in Lomiri UI code?

        I 1 Reply Last reply Reply Quote 0
        • I Offline
          iqrajaved @iqrajaved
          last edited by

          Waiting for the guidance...

          lduboeufL 1 Reply Last reply Reply Quote 0
          • lduboeufL Offline
            lduboeuf @iqrajaved
            last edited by

            @iqrajaved no idea 🙂

            True, the resolution is not exactly the same, but should be not that far from real situation.
            Some testers like tryShell have the possibility to set the size and usage scenario which is close to the Phone resolution.
            I don't know if we can set during tests the GRID_UNIT_PX ( which is an env var you can see on the phone)

            I 1 Reply Last reply Reply Quote 0
            • I Offline
              iqrajaved @lduboeuf
              last edited by

              @lduboeuf
              The variable GRIP_UNIT_PX on my phone is 21, how is the width and height are related to this variable? I am sorry if its a naive question, but I couldn't find it.

              I believe the default value in lomiri ui is 8 for this

              I 1 Reply Last reply Reply Quote 0
              • I Offline
                iqrajaved @iqrajaved
                last edited by

                @lduboeuf
                Also can you please tell me that what's the mathematics behind units.gu(int) with respect to the width and height? How these are related?
                May be I can use this for general changes

                lduboeufL 1 Reply Last reply Reply Quote 0
                • lduboeufL Offline
                  lduboeuf @iqrajaved
                  last edited by

                  @iqrajaved said in Where to set the main resolution of the Ubuntu Touch for a specific mobile model?:

                  @lduboeuf
                  Also can you please tell me that what's the mathematics behind units.gu(int) with respect to the width and height? How these are related?
                  May be I can use this for general changes

                  Maybe that resource will help you: https://docs.ubports.com/en/latest/humanguide/design-concepts/units.html

                  I 1 Reply Last reply Reply Quote 1
                  • I Offline
                    iqrajaved @lduboeuf
                    last edited by

                    @lduboeuf thank you, it helps

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post