Advertisement
T4ng10r

QML, column and lack of top margin

Dec 26th, 2016
2,201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
QML 1.40 KB | None | 0 0
  1. Rectangle {
  2.     width: 180
  3.     height: 64
  4.     color: "#e6efe9"
  5.  
  6.     Column {
  7.         anchors {
  8.             right: parent.right
  9.             rightMargin: 5
  10.             topMargin: 15
  11.         }
  12.         height: parent.height
  13.         width: 24
  14.         spacing: (height - 2*width)/2
  15.         Button {
  16.             iconSource: "img/play1.png"
  17.             style: ButtonStyle {
  18.                 background: Rectangle {
  19.                     width: parent.width
  20.                     implicitHeight: width
  21.                     border.width: control.activeFocus ? 1 : 2
  22.                     border.color: "#c0c9c2"
  23.                     color: "#000000"
  24.                     radius: width * 0.5
  25.                     gradient: Gradient {
  26.                         GradientStop { position: 5 ; color: "#000000" }
  27.                         GradientStop { position: 6 ; color: control.pressed ? "#ccc" : "red" }
  28.                     }
  29.                 }
  30.             }
  31.         }
  32.         Button {
  33.             iconSource: "img/iritated.jpg"
  34.             style: ButtonStyle {
  35.                 background: Rectangle {
  36.                     implicitWidth: 24
  37.                     implicitHeight: width
  38.                     border.width: control.activeFocus ? 1 : 2
  39.                     border.color: "#c0c9c2"
  40.                     color: "#d7e0da"
  41.                     radius: width * 0.5
  42.                 }
  43.             }
  44.         }
  45.     }
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement