Commit bbf45c19 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

Use QQC2 Label as kirigami does

parent d809fe59
......@@ -19,6 +19,7 @@
import QtQuick 2.1
import QtQuick.Controls 1.1
import QtQuick.Controls 2.1 as QQC2
import QtQuick.Layouts 1.1
import org.kde.kquickcontrolsaddons 2.0
import org.kde.discover.app 1.0
......@@ -76,7 +77,7 @@ Kirigami.AbstractListItem
Layout.minimumWidth: Math.min(implicitWidth, conts.width)
maximumLineCount: 1
}
Label {
QQC2.Label {
Layout.fillWidth: true
elide: Text.ElideRight
horizontalAlignment: Text.AlignRight
......@@ -92,7 +93,7 @@ Kirigami.AbstractListItem
height: Kirigami.Units.devicePixelRatio
}
Label {
QQC2.Label {
Layout.fillWidth: true
elide: Text.ElideRight
......@@ -101,7 +102,7 @@ Kirigami.AbstractListItem
font: SystemFonts.titleFont
}
Label {
QQC2.Label {
Layout.fillWidth: true
horizontalAlignment: Text.AlignJustify
......
......@@ -19,6 +19,7 @@
import QtQuick 2.5
import QtQuick.Controls 1.1
import QtQuick.Controls 2.1 as QQC2
import QtQuick.Window 2.1
import QtQuick.Layouts 1.1
import org.kde.kquickcontrolsaddons 2.0
......@@ -138,7 +139,7 @@ DiscoverPage {
width: ListView.view.width - Kirigami.Units.gridUnit * 2
spacing: 0
Label {
QQC2.Label {
Layout.topMargin: Kirigami.Units.largeSpacing
Layout.fillWidth: true
text: appInfo.application.comment
......@@ -146,7 +147,7 @@ DiscoverPage {
elide: Text.ElideRight
maximumLineCount: 1
}
Label {
QQC2.Label {
Layout.fillWidth: true
elide: Text.ElideRight
text: appInfo.application.categoryDisplay
......@@ -157,16 +158,16 @@ DiscoverPage {
Layout.fillWidth: true
Layout.fillHeight: true
}
Label {
QQC2.Label {
readonly property string version: appInfo.application.isInstalled ? appInfo.application.installedVersion : appInfo.application.availableVersion
visible: version.length > 0
text: version ? i18n("Version: %1", version) : ""
}
Label {
QQC2.Label {
text: i18n("Size: %1", appInfo.application.sizeDescription)
}
RowLayout {
Label {
QQC2.Label {
text: i18n("Source:")
}
LinkButton {
......@@ -176,7 +177,7 @@ DiscoverPage {
}
}
RowLayout {
Label {
QQC2.Label {
text: i18n("License:")
}
LinkButton {
......@@ -199,7 +200,7 @@ DiscoverPage {
Layout.fillWidth: true
visible: appInfo.application.longDescription.length > 0
}
Kirigami.Label {
QQC2.Label {
Layout.fillWidth: true
horizontalAlignment: Text.AlignJustify
wrapMode: Text.WordWrap
......@@ -214,7 +215,7 @@ DiscoverPage {
RowLayout {
visible: button.text.length > 0
Label {
QQC2.Label {
text: i18n("Homepage: ")
}
LinkButton {
......
......@@ -19,6 +19,7 @@
import QtQuick 2.5
import QtQuick.Controls 1.1
import QtQuick.Controls 2.1 as QQC2
import QtQuick.Layouts 1.1
import QtQuick.Window 2.2
import "navigation.js" as Navigation
......@@ -58,7 +59,7 @@ DiscoverPage {
ListView {
id: apps
section.delegate: Label {
section.delegate: QQC2.Label {
text: section
anchors {
right: parent.right
......@@ -86,7 +87,7 @@ DiscoverPage {
compact: page.compact
}
Kirigami.Label {
QQC2.Label {
anchors.centerIn: parent
opacity: apps.count == 0 && !appsModel.isBusy ? 0.3 : 0
Behavior on opacity { PropertyAnimation { duration: Kirigami.Units.longDuration; easing.type: Easing.InOutQuad; } }
......@@ -131,7 +132,7 @@ DiscoverPage {
}
}
]
Kirigami.Label {
QQC2.Label {
id: busyLabel
anchors {
horizontalCenter: parent.horizontalCenter
......
import QtQuick 2.1
import QtQuick.Layouts 1.1
import QtQuick.Controls 1.1
import QtQuick.Controls 2.1 as QQC2
import org.kde.discover 2.0
import org.kde.discover.app 1.0
import org.kde.kirigami 2.0 as Kirigami
......@@ -129,7 +130,7 @@ Kirigami.ApplicationWindow
Kirigami.Heading {
id: heading
}
Kirigami.Label {
QQC2.Label {
id: desc
Layout.fillWidth: true
wrapMode: Text.WordWrap
......
......@@ -18,7 +18,7 @@
*/
import QtQuick 2.1
import QtQuick.Controls 1.1
import QtQuick.Controls 2.1
import QtQuick.Layouts 1.1
import org.kde.discover.app 1.0
import org.kde.kirigami 2.0 as Kirigami
......
import QtQuick 2.2
import org.kde.kirigami 2.0 as Kirigami
import QtQuick.Controls 2.1 as QQC2
Kirigami.Label {
QQC2.Label {
id: control
property QtObject action: null //some older Qt versions don't support the namespacing in Kirigami.Action
......
import org.kde.kirigami 2.0 as Kirigami
import QtQuick.Controls 2.1 as QQC2
Kirigami.Page {
title: label.text
Kirigami.Label {
QQC2.Label {
id: label
text: i18n("Loading...")
font.pointSize: 52
......
import QtQuick 2.1
import QtQuick.Controls 1.1
import QtQuick.Controls 2.1 as QQC2
import QtQuick.Layouts 1.1
import org.kde.kquickcontrolsaddons 2.0
import org.kde.discover 2.0
......@@ -96,7 +97,7 @@ Kirigami.BasicListItem {
source: model.transaction.icon
}
Label {
QQC2.Label {
anchors.verticalCenter: parent.verticalCenter
Layout.fillWidth: true
elide: Text.ElideRight
......
......@@ -19,8 +19,9 @@
import QtQuick 2.1
import QtQuick.Layouts 1.1
import org.kde.kirigami 2.0
import QtQuick.Controls 2.1
import org.kde.discover 2.0
import org.kde.kirigami 2.0 as Kirigami
ColumnLayout
{
......@@ -75,7 +76,7 @@ ColumnLayout
}
onLinkActivated: item.markUseful(link=='true')
}
Separator {
Kirigami.Separator {
Layout.fillWidth: true
}
}
import QtQuick.Controls 1.2
import QtQuick.Controls 2.1 as QQC2
import QtQuick.Layouts 1.1
import QtQuick 2.4
import org.kde.discover 2.0
......@@ -61,7 +62,7 @@ DiscoverPage
Layout.leftMargin: Kirigami.Units.gridUnit
text: updateModel.toUpdateCount + " (" + updateModel.updateSize+")"
}
Label {
QQC2.Label {
text: i18n("updates selected")
}
LabelBackground {
......@@ -70,7 +71,7 @@ DiscoverPage
text: unselected
visible: unselected>0
}
Label {
QQC2.Label {
text: i18n("updates not selected")
visible: unselectedItem.visible
}
......@@ -160,7 +161,7 @@ DiscoverPage
source: decoration
}
Label {
QQC2.Label {
Layout.fillWidth: true
text: i18n("%1 (%2)", display, version)
elide: Text.ElideRight
......@@ -181,7 +182,7 @@ DiscoverPage
frameVisible: true
visible: layout.extended && changelog.length>0
Label {
QQC2.Label {
width: view.viewport.width
text: changelog
textFormat: Text.RichText
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment