Better_Software_Header_MobileBetter_Software_Header_Web

Find what you need - explore our website and developer resources

In Pixels We Trust

Scalable UIs In QML part 2

Notice that each icon was slightly altered to take advantage of the extra pixels while maintaining the same look overall.

BorderImage {
   id: scalableElement
   source: "./image/Imagebase.png"
   width: 100; height: 100
   border.left: 25; border.top: 25
   border.right: 25; border.bottom: 25
  }
....
property int dpi: Screen.pixelDensity*25.4
....
BorderImage {
   id: scalableElement2
   source: "./image/Imagebase.png"
   width: 1.5*dpi; height: 0.36*dpi
   border.left: 25; border.top: 25
   border.right: 25; border.bottom: 25
  }

10 Comments

3 - Jun - 2014

Jens H. Göbbert

3 - Jun - 2014

Nuno Pinheiro

4 - Jun - 2014

Jens H. Göbbert

10 - Mar - 2017

Miguel

function dp2px(dps)
{
    return dps*(dpi/160);
}

28 - Apr - 2017

Tony

7 - May - 2017

Nuno Pinheiro

28 - Dec - 2017

joni

29 - Dec - 2017

Nuno Pinheiro

30 - Dec - 2017

joni

31 - Dec - 2017

Nuno Pinheiro

NunoPinheiro

Nuno Pinheiro

Senior UI/UX Designer