Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2019
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
QML 0.92 KB | None | 0 0
  1. import QtQuick 2.2
  2. import Sailfish.Silica 1.0
  3.  
  4. ListItem {
  5.     id: listItem
  6.    
  7.     menu: ContextMenu {
  8.         // context menu items
  9.     }
  10.     contentHeight: Theme.itemSizeMedium // minimum size for touch interaction
  11.     ListView.onRemove: animateRemoval(listItem) // animate item removal
  12.  
  13.     Label {
  14.         id: label
  15.         text: qsTr("Item label")
  16.         color: listItem.highlighted ? Theme.highlightColor : Theme.primaryColor
  17.         anchors {
  18.             left: parent.left; leftMargin: Theme.horizontalPageMargin
  19.             right: parent.right; leftMargin: Theme.horizontalPageMargin
  20.         }
  21.     }
  22.     Label {
  23.         text: "Item description"
  24.         font.pixelSize: Theme.fontSizeSmall
  25.         color: listItem.highlighted ? Theme.highlightColor : Theme.secondaryColor
  26.         anchors {
  27.             top: label.bottom
  28.             left: label.left
  29.             right: label.right
  30.         }
  31.     }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement