Commit 50564061 authored by Jan Blackquill's avatar Jan Blackquill 🌈 Committed by Jan Blackquill
Browse files

Port from context properties to singletons

parent 221fc775
......@@ -12,6 +12,7 @@
*/
import QtQuick 2.0
import org.kde.plasma.core 2.0 as PlasmaCore
Item {
property int val
......@@ -33,7 +34,7 @@ Item {
x: 0
y: main.dotSize
width: main.dotSize
height: units.smallSpacing
height: PlasmaCore.Units.smallSpacing
color: main.gridColor
}
......@@ -42,8 +43,8 @@ Item {
visible: main.showGrid
x: main.dotSize
y: 0
width: units.smallSpacing
height: main.dotSize+units.smallSpacing
width: PlasmaCore.Units.smallSpacing
height: main.dotSize+PlasmaCore.Units.smallSpacing
color: main.gridColor
}
}
......@@ -12,6 +12,7 @@
*/
import QtQuick 2.0
import org.kde.plasma.core 2.0 as PlasmaCore
Item {
property int val
......@@ -23,19 +24,19 @@ Item {
}
Dot {
x: 0
y: (dotSize+units.smallSpacing)
y: (dotSize+PlasmaCore.Units.smallSpacing)
val: parent.val
bit: 4
}
Dot {
x: 0
y: 2*(dotSize+units.smallSpacing)
y: 2*(dotSize+PlasmaCore.Units.smallSpacing)
val: parent.val
bit: 2
}
Dot {
x: 0
y: 3*(dotSize+units.smallSpacing)
y: 3*(dotSize+PlasmaCore.Units.smallSpacing)
val: parent.val
bit: 1
}
......
......@@ -39,7 +39,7 @@ ColumnLayout {
background: Rectangle {
id: highlight
implicitWidth: root.width - units.largeSpacing
implicitWidth: root.width - Kirigami.Units.largeSpacing
visible: model.id == root.cfg_dictionary
color: Kirigami.Theme.highlightColor
}
......
......@@ -103,7 +103,7 @@ Kirigami.FormLayout {
id: comboBox
Kirigami.FormData.label: i18nc("@label:listbox", "Image fill mode:")
// Layout.minimumWidth: units.gridUnit * 10
// Layout.minimumWidth: Kirigami.Units.gridUnit * 10
currentIndex: fillModeToIndex(fillMode)
textRole: "text"
model: [
......
......@@ -8,6 +8,7 @@ import QtQuick 2.9
import QtQuick.Layouts 1.3
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 3.0 as PlasmaComponents
ColumnLayout {
......@@ -18,7 +19,7 @@ ColumnLayout {
GridLayout {
Layout.alignment: Qt.AlignTop | Qt.AlignHCenter
rowSpacing: units.smallSpacing
rowSpacing: PlasmaCore.Units.smallSpacing
Repeater {
id: labelRepeater
......
......@@ -9,12 +9,13 @@ import QtQuick 2.9
import QtQuick.Layouts 1.3
import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 3.0 as PlasmaComponents
ColumnLayout {
id: fullRoot
Layout.margins: units.smallSpacing
Layout.margins: PlasmaCore.Units.smallSpacing
property alias generalModel: topPanel.generalModel
property alias observationModel: topPanel.observationModel
......
......@@ -9,6 +9,7 @@ import QtQuick 2.9
import QtQuick.Layouts 1.3
import org.kde.plasma.components 3.0 as PlasmaComponents
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.extras 2.0 as PlasmaExtras
ColumnLayout {
......@@ -17,7 +18,7 @@ ColumnLayout {
property alias model: categoryRepeater.model
readonly property bool hasContent: model && model.length > 0 && (model[0].length > 0 || model[1].length > 0)
spacing: units.largeSpacing
spacing: PlasmaCore.Units.largeSpacing
Repeater {
id: categoryRepeater
......
......@@ -11,6 +11,7 @@ import QtWebEngine 1.5
import QtQuick.Layouts 1.1
import org.kde.plasma.components 2.0 as PlasmaComponents // for Menu+MenuItem
import org.kde.plasma.components 3.0 as PlasmaComponents3
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.extras 2.0 as PlasmaExtras
ColumnLayout {
......@@ -85,8 +86,8 @@ ColumnLayout {
Layout.fillHeight: true
// TODO use contentsSize but that crashes, now mostly for some sane initial size
Layout.preferredWidth: units.gridUnit * 36
Layout.preferredHeight: units.gridUnit * 18
Layout.preferredWidth: PlasmaCore.Units.gridUnit * 36
Layout.preferredHeight: PlasmaCore.Units.gridUnit * 18
// Binding it to e.g. width will be super slow on resizing
Timer {
......
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