Commit fde8d23b authored by Bo Simonsen's avatar Bo Simonsen Committed by Nate Graham
Browse files

Use QtQuick.Controls 2.0 Label in energy and fileindexmonitor KCM

Summary:
The QtQuick.Controls 1.0 does not handle Label well on screens that uses a fractional scaling. The fonts become
blurry, this has been fixed in  QtQuick.Controls 2.0 and org.kde.plasma.components, however we prefer to use QtQuick.Controls 2.0 since the modules will anyway transition to 2.x at some time.

CCBUG: 366451

Test Plan: * Use scaling 1,5 and fonts will appear correctly in kcm_energyinfo and kcm_fileindexmonitor

Reviewers: davidedmundson

Reviewed By: davidedmundson

Subscribers: zzag, davidedmundson, ngraham, broulik, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D14011
parent 125f45a1
......@@ -19,6 +19,7 @@
import QtQuick 2.2
import QtQuick.Controls 1.3
import QtQuick.Controls 2.0 as QQC2
import QtQuick.Layouts 1.1
import org.kde.kquickcontrolsaddons 2.0
......@@ -285,7 +286,7 @@ Item {
visible: history.count > 1
}
Label {
QQC2.Label {
Layout.fillWidth: true
Layout.minimumHeight: column.width / 3
Layout.maximumHeight: column.width / 3
......@@ -365,7 +366,7 @@ Item {
RowLayout {
Layout.fillWidth: true
Label {
QQC2.Label {
Layout.fillWidth: true
elide: Text.ElideRight
text: model.prettyName || model.name
......@@ -439,7 +440,7 @@ Item {
spacing: units.smallSpacing * 2
visible: valueLabel.text !== ""
Label {
QQC2.Label {
Layout.minimumWidth: detailsColumn.legendWidth + units.gridUnit
horizontalAlignment: Text.AlignRight
text: i18n("%1:", modelData.label)
......@@ -452,7 +453,7 @@ Item {
}
}
Label {
QQC2.Label {
id: valueLabel
Layout.fillWidth: true
text: {
......
......@@ -22,6 +22,7 @@
import QtQuick 2.4
import QtQuick.Controls 1.3
import QtQuick.Controls 2.0 as QQC2
import QtQuick.Layouts 1.1
import org.kde.baloo.experimental 0.1 as Baloo
......@@ -42,12 +43,12 @@ Item {
spacing: 20
visible: monitor.balooRunning
Label {
QQC2.Label {
id: indexerState
text: i18n("Indexer State: %1", monitor.stateString)
}
Label {
QQC2.Label {
id: filePath
// Required so that text elides instead of expanding the entire layout
......@@ -86,7 +87,7 @@ Item {
}
}
Label {
QQC2.Label {
visible: monitor.state == Constants.State.ContentIndexing
id: remainingTime
text: i18n("Remaining Time: %1", monitor.remainingTime)
......@@ -100,7 +101,7 @@ Item {
spacing: 20
Label {
QQC2.Label {
Layout.fillWidth: true
horizontalAlignment: Text.AlignHCenter
text: i18n("File Indexer not running")
......
Supports Markdown
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