Skip to content

Latest commit

 

History

History
89 lines (85 loc) · 2.48 KB

snippets.md

File metadata and controls

89 lines (85 loc) · 2.48 KB

Plasma Docs

QML Formatting

Spacing

  Units.smallSpacing
  Units.mediumSpacing
  Units.largelSpacing

  implicitHeight:120  // can change dynamically
  implicitWidth:120

  preferredWidth:120
  preferredHeight:120

Anchors

  anchors.top:parent.bottom
  anchors.bottom: parent.bottom
  anchors.fill:parent
  anchors.centerIn: root
  anchors.left: parent.left
  anchors.right: parent.right
  anchors.topMargin: units.smallSpacing
  anchors.bottomMargin: units.smallSpacing
  anchors.leftMargin: Units.mediumSpacing
  anchors.rightMargin:units.smallSpacing
  anchors.horizontalCenter:id.horizontalCenter
  anchors.verticalCenter:id.verticalCenter

Layouts use in RowLayout,ColumnLayout,GridLayout

Layout.fillWidth: true // use with width for uniform spacing
Layout.fillHeight: true
horizontalAlignment : Text.AlignLeft (Default)
                      Text.AlignRight
                      Text.AlignHCenter

verticalAlignment   : Text.AlignTop
                      Text.AlignTop
                      Text.AlignBottom
                      Text.AlignVCenter (Default)

Layout.alignment: Qt.AlignLeft // Qt.AlignRight // Qt.AlignVCenter // Qt.AlignHCenter

Fonts

  font.family:config.displayFont // default theme font
  font.family:theme.displayFont // default theme font
  font.family:Noto Sans
  font.weight: Font.Black
  font.pointSize:12
  antialiasing : true
  font.bold:true
  font.italic:true
  textFormat: Text.RichText // use for inline html //Text.AutoText//Text.PlainText//Text.MarkdownText
  wrapMode:Text.WordWrap
  font.capitalization: Font.Capitalize  // capital first letter of text string

Colors

  color: Theme.textColor  // default theme color
  color: Theme.viewTextColor
  color: config.textColor // user selected
  Theme.highlightColor
  Theme.highlightedTextColor
  Theme.backgroundColor
  Theme.buttonHoverColor
  Theme.viewHoverColor
  color: transparent
  color: ColorScope.textColor

QML Theme Options

  Theme.viewTextColor
  Theme.textColor
  Theme.highlightColor
  Theme.highlightedTextColor
  Theme.backgroundColor
  Theme.linkColor
  Theme.visitedLinkColor
  Theme.positiveTextColor
  Theme.neutralTextColor
  Theme.negativeTextColor
  Theme.disabledTextColor
  Theme.complementaryTextColor
  Theme.viewTextColor
  Theme.headerTextColor
  Theme.buttonTextColor