[kcmkwin] Use QtQuick.Controls 2.0 for Label and TextField
Summary: Using QtQuick.Controls for Label and TextField can result in blurry font rendering for a fractional scaling (e.g. 1,5). There is a work around for QtQuick.Controls 2.x therefore using QtQuick.Controls 2.0 for Label and TextField resolves the problem BUG: 366451 Reviewers: #kwin, davidedmundson Reviewed By: #kwin, davidedmundson Subscribers: ngraham, zzag, davidedmundson, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D14495
This commit is contained in:
parent
39ddc54c0a
commit
22d898399b
3 changed files with 16 additions and 13 deletions
|
@ -21,6 +21,7 @@
|
|||
|
||||
import QtQuick 2.1
|
||||
import QtQuick.Controls 1.1
|
||||
import QtQuick.Controls 2.0 as QQC2
|
||||
import QtQuick.Layouts 1.0
|
||||
import org.kde.kwin.kwincompositing 1.0
|
||||
|
||||
|
@ -101,22 +102,22 @@ Rectangle {
|
|||
id: effectItem
|
||||
property int maximumWidth: parent.maximumWidth - checkBoxLayout.width - (videoButton.width + configureButton.width + aboutButton.width) - parent.spacing * 5
|
||||
Layout.maximumWidth: maximumWidth
|
||||
Label {
|
||||
QQC2.Label {
|
||||
text: model.NameRole
|
||||
font.bold: true
|
||||
font.weight: Font.Bold
|
||||
wrapMode: Text.Wrap
|
||||
Layout.maximumWidth: parent.maximumWidth
|
||||
}
|
||||
Label {
|
||||
QQC2.Label {
|
||||
id: desc
|
||||
text: model.DescriptionRole
|
||||
wrapMode: Text.Wrap
|
||||
Layout.maximumWidth: parent.maximumWidth
|
||||
}
|
||||
Label {
|
||||
QQC2.Label {
|
||||
id:aboutItem
|
||||
text: i18n("Author: %1\nLicense: %2", model.AuthorNameRole, model.LicenseRole)
|
||||
font.bold: true
|
||||
font.weight: Font.Bold
|
||||
visible: false
|
||||
wrapMode: Text.Wrap
|
||||
Layout.maximumWidth: parent.maximumWidth
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
|
||||
import QtQuick 2.1
|
||||
import QtQuick.Controls 1.0
|
||||
import QtQuick.Controls 2.0 as QQC2
|
||||
import QtQuick.Layouts 1.0
|
||||
import org.kde.kwin.kwincompositing 1.0
|
||||
|
||||
|
@ -35,12 +36,12 @@ Rectangle {
|
|||
implicitHeight: sectionText.implicitHeight + 2 * col.spacing
|
||||
color: searchModel.backgroundNormalColor
|
||||
|
||||
Label {
|
||||
QQC2.Label {
|
||||
id: sectionText
|
||||
x: col.spacing
|
||||
y: col.spacing
|
||||
text: section
|
||||
font.bold: true
|
||||
font.weight: Font.Bold
|
||||
color: searchModel.sectionColor
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
|
@ -58,7 +59,7 @@ Rectangle {
|
|||
id: col
|
||||
anchors.fill: parent
|
||||
|
||||
Label {
|
||||
QQC2.Label {
|
||||
id: hint
|
||||
text: i18n("Hint: To find out or configure how to activate an effect, look at the effect's settings.")
|
||||
anchors {
|
||||
|
@ -68,7 +69,7 @@ Rectangle {
|
|||
}
|
||||
|
||||
RowLayout {
|
||||
TextField {
|
||||
QQC2.TextField {
|
||||
// TODO: needs clear button, missing in Qt
|
||||
id: searchField
|
||||
placeholderText: i18n("Search")
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
*/
|
||||
import QtQuick 2.3
|
||||
import QtQuick.Controls 1.2
|
||||
import QtQuick.Controls 2.0 as QQC2
|
||||
import QtQuick.Layouts 1.1
|
||||
import org.kde.kwin.private.kdecoration 1.0 as KDecoration
|
||||
import org.kde.kquickcontrolsaddons 2.0 as KQuickControlsAddons;
|
||||
|
@ -70,7 +71,7 @@ Item {
|
|||
Layout.fillWidth: true
|
||||
anchors.centerIn: parent
|
||||
height: titlebar.implicitHeight
|
||||
Label {
|
||||
QQC2.Label {
|
||||
id: titlebar
|
||||
anchors.centerIn: parent
|
||||
font: titleFont
|
||||
|
@ -165,7 +166,7 @@ Item {
|
|||
Drag.keys: [ "decoButtonAdd" ]
|
||||
Drag.active: dragArea.drag.active
|
||||
}
|
||||
Label {
|
||||
QQC2.Label {
|
||||
id: iconLabel
|
||||
text: model["display"]
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
|
@ -212,9 +213,9 @@ Item {
|
|||
ColumnLayout {
|
||||
anchors.centerIn: parent
|
||||
visible: leftButtonsView.dragging || rightButtonsView.dragging
|
||||
Label {
|
||||
QQC2.Label {
|
||||
text: i18n("Drop here to remove button")
|
||||
font.bold: true
|
||||
font.weight: Font.Bold
|
||||
}
|
||||
KQuickControlsAddons.QIconItem {
|
||||
id: icon
|
||||
|
|
Loading…
Reference in a new issue