Port away from Title and towards level 1 Heading

Summary: `Title` is deprecated.

Test Plan: No visual changes anywhere; level 1 Heading is identical in appearance

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D27350
This commit is contained in:
Nate Graham 2020-02-12 08:32:53 -07:00
parent ba0b637de9
commit 6b8f114284
16 changed files with 31 additions and 18 deletions

View File

@ -48,7 +48,8 @@ Item {
margins: units.largeSpacing
}
PlasmaExtras.Title {
PlasmaExtras.Heading {
level: 1
text: i18n("Reporting Bugs")
}
PlasmaExtras.Heading {

View File

@ -40,8 +40,9 @@ Item {
Column {
anchors.fill: parent
spacing: 12
PlasmaExtras.Title {
PlasmaExtras.Heading {
id: tx
level: 1
text: "Test Dialog"
}
PlasmaComponents.TextArea {

View File

@ -35,8 +35,9 @@ PlasmaComponents.Page {
Column {
spacing: _s/2
anchors.fill: parent
PlasmaExtras.Title {
PlasmaExtras.Heading {
width: parent.width
level: 1
text: "Dialogs"
}
Row {

View File

@ -39,11 +39,11 @@ PlasmaComponents.Page {
margins: _s
}
PlasmaExtras.Title {
PlasmaExtras.Heading {
id: dlabel
anchors { left: parent.left; right: parent.right; top: parent.top; }
level: 1
text: "Drag & Drop"
}

View File

@ -35,9 +35,10 @@ PlasmaComponents.Page {
anchors.fill: parent
spacing: _s
PlasmaExtras.Title {
PlasmaExtras.Heading {
width: parent.width
elide: Text.ElideRight
level: 1
text: "Icons"
}
PlasmaComponents.Label {

View File

@ -31,8 +31,9 @@ PlasmaComponents.Page {
fill: parent
margins: _s
}
PlasmaExtras.Title {
PlasmaExtras.Heading {
id: mellabel
level: 1
text: "MouseEventListener"
anchors { left: parent.left; right: parent.right; top: parent.top }
}

View File

@ -41,9 +41,10 @@ PlasmaComponents.Page {
//anchors.fill: parent
//spacing: _s / 4
PlasmaExtras.Title {
PlasmaExtras.Heading {
width: parent.width
elide: Text.ElideRight
level: 1
text: "Theme"
}

View File

@ -115,7 +115,7 @@ Column {
}
}
PlasmaExtras.Title {
PlasmaExtras.Heading {
font.weight: lightCheck.checked ? Font.Light : Font.Normal
font.family: fontCheck.text

View File

@ -43,9 +43,10 @@ Item {
right: parent.right
}
PlasmaExtras.Title {
PlasmaExtras.Heading {
width: parent.width
elide: Text.ElideRight
level: 1
text: "Scaling Test"
font.pointSize: cheatLabel.font.pointSize * 2
}

View File

@ -40,9 +40,10 @@ Item {
//anchors.fill: parent
//spacing: units.smallSpacing/2
PlasmaExtras.Title {
PlasmaExtras.Heading {
width: parent.width
elide: Text.ElideRight
level: 1
text: "Theme & DPI Test"
}

View File

@ -32,7 +32,8 @@ PlasmaComponents.Page {
iconSource: "go-previous"
onClicked: pageStack.pop()
}
PlasmaExtras.Title {
PlasmaExtras.Heading {
level: 1
text: "Typography"
}
}
@ -55,7 +56,8 @@ PlasmaComponents.Page {
}
spacing: 12
PlasmaExtras.Title {
PlasmaExtras.Heading {
level: 1
text: "A Title"
}

View File

@ -42,7 +42,8 @@ Item {
spacing: units.gridUnit
// A title on top
PlasmaExtras.Title {
PlasmaExtras.Heading {
level: 1 // from 1 to 5; level 1 is the size used for titles
text: i18n("Hello Plasma World!")
}

View File

@ -33,7 +33,7 @@ import org.kde.plasma.components 2.0
* import org.kde.plasma.extras 2.0 as PlasmaExtras
* [...]
* Column {
* PlasmaExtras.Title { text: "Fruit sweetness on the rise" }
* PlasmaExtras.Heading { text: "Fruit sweetness on the rise"; level: 1 }
* PlasmaExtras.Heading { text: "Apples in the sunlight"; level: 2 }
* PlasmaExtras.Paragraph { text: "Long text about fruit and apples [...]" }
* [...]

View File

@ -32,7 +32,7 @@ import org.kde.plasma.components 2.0
* import org.kde.plasma.extras 2.0 as PlasmaExtras
* [...]
* Column {
* PlasmaExtras.Title { text: "Fruit sweetness on the rise" }
* PlasmaExtras.Heading { text: "Fruit sweetness on the rise"; level: 1 }
* PlasmaExtras.Heading { text: "Apples in the sunlight"; level: 2 }
* PlasmaExtras.Paragraph { text: "Long text about fruit and apples [...]" }
* [...]

View File

@ -38,8 +38,9 @@ Item {
ColumnLayout {
anchors.centerIn: parent
PlasmaExtras.Title {
PlasmaExtras.Heading {
Layout.alignment: Qt.AlignCenter
level: 1
text: wallpaper.configuration.DisplayText ||
i18n("<Please configure a text to display>")
}

View File

@ -30,8 +30,9 @@ Item {
color: Theme.backgroundColor
}
PlasmaExtras.Title {
PlasmaExtras.Heading {
anchors.centerIn: parent
level: 1
text: wallpaper.configuration.DisplayText ||
i18n("<Please configure a text to display>")
}