Better_Software_Header_MobileBetter_Software_Header_Web

Find what you need - explore our website and developer resources

BorderImage is for Scaling!

Scalable UIs 2.2

.......
 BorderImage {
   id: scalableElement2
   source: "./Images/baseBImage.png"
   width: parent.width-ppi/2
   height: ppi*1.5
   anchors.centerIn: parent
   border.left: 27; border.top: 27
   border.right: 16; border.bottom: 16
 }
.......
.......
property var dir: ["MDPI","HDPI","XHDPI","XXHDPI",
                                    "XXXHDPI","XXXXHDPI"]
readonly property int ppiRange:{
 if (ppi>=540)
  5
 else if (ppi>=360)
  4
 else if (ppi>=270)
  3
 else if (ppi>=180)
  2
 else if (ppi>=135)
  1
 else
  0
 }
.......
......
BorderImage {
   id: scalableElement3
   source: "./Images/" + dir[ppiRange] + "/image.png"
   width: parent.width-ppi/2
   height: ppi*1.5
   anchors.centerIn: parent
   border.left: 0.3*ppi; border.top: 0.3*ppi
   border.right: 0.18*ppi; border.bottom: 0.18*ppi
 }
.......

11 Comments

1 - Jul - 2014

M

1 - Jul - 2014

Nuno Pinheiro

2 - Jul - 2014

fri13

2 - Jul - 2014

Nuno Pinheiro

18 - Jul - 2014

jeroen

18 - Jul - 2014

Nuno Pinheiro

24 - Jul - 2014

Akash

19 - Nov - 2014

Sergey

21 - Nov - 2014

Nuno Pinheiro

20 - Mar - 2018

Daniel d'Andrada

20 - Mar - 2018

Nuno Pinheiro

NunoPinheiro

Nuno Pinheiro

Senior UI/UX Designer