Verified Commit 032898c0 authored by ivan tkachenko's avatar ivan tkachenko
Browse files

plasmoid: Port away from unit context property to PlasmaCore.Units

parent ac315a80
......@@ -13,7 +13,7 @@ import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.extras 2.0 as PlasmaExtras
ColumnLayout {
spacing: units.smallSpacing
spacing: PlasmaCore.Units.smallSpacing
PlasmaComponents.CheckBox {
id: checkBox
......@@ -71,18 +71,18 @@ ColumnLayout {
RowLayout {
Layout.fillWidth: true
Layout.leftMargin: checkBoxMetrics.width
spacing: units.smallSpacing
spacing: PlasmaCore.Units.smallSpacing
PlasmaCore.IconItem {
Layout.preferredWidth: units.iconSizes.medium
Layout.preferredHeight: units.iconSizes.medium
Layout.preferredWidth: PlasmaCore.Units.iconSizes.medium
Layout.preferredHeight: PlasmaCore.Units.iconSizes.medium
source: pmSource.inhibitions[0] ? pmSource.inhibitions[0].Icon || "" : ""
visible: valid
}
PlasmaComponents.Label {
Layout.fillWidth: true
Layout.maximumWidth: Math.min(units.gridUnit * 20, implicitWidth)
Layout.maximumWidth: Math.min(PlasmaCore.Units.gridUnit * 20, implicitWidth)
font.pointSize: theme.smallestFont.pointSize
wrapMode: Text.WordWrap
elide: Text.ElideRight
......
......@@ -14,7 +14,7 @@ import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.extras 2.0 as PlasmaExtras
ColumnLayout {
spacing: 0
spacing: PlasmaCore.Units.smallSpacing * 2
states: [
State {
......@@ -43,7 +43,7 @@ ColumnLayout {
id: screenLayoutRow
readonly property int buttonSize: Math.floor((width - spacing * (screenLayoutRepeater.count - 1)) / screenLayoutRepeater.count)
Layout.fillWidth: true
spacing: units.smallSpacing
spacing: PlasmaCore.Units.smallSpacing
Repeater {
id: screenLayoutRepeater
......@@ -61,7 +61,7 @@ ColumnLayout {
anchors.centerIn: parent
width: height
// FIXME use proper FrameSvg margins and stuff
height: parent.height - units.smallSpacing
height: parent.height - PlasmaCore.Units.smallSpacing
source: modelData.iconName
active: parent.hovered
}
......@@ -72,7 +72,7 @@ ColumnLayout {
PlasmaExtras.DescriptiveLabel {
id: noScreenLabel
Layout.fillWidth: true
Layout.maximumWidth: Math.min(units.gridUnit * 20, implicitWidth)
Layout.maximumWidth: Math.min(PlasmaCore.Units.gridUnit * 20, implicitWidth)
wrapMode: Text.Wrap
text: i18n("You can only apply a different screen layout when there is more than one display device plugged in.")
font.pointSize: theme.smallestFont.pointSize
......
......@@ -88,17 +88,17 @@ Item {
Plasmoid.fullRepresentation: ColumnLayout {
spacing: 0
Layout.preferredWidth: units.gridUnit * 15
Layout.preferredWidth: PlasmaCore.Units.gridUnit * 15
ScreenLayoutSelection {
Layout.leftMargin: units.smallSpacing
Layout.leftMargin: PlasmaCore.Units.smallSpacing
Layout.fillWidth: true
}
PresentationModeItem {
Layout.fillWidth: true
Layout.topMargin: units.largeSpacing
Layout.leftMargin: units.smallSpacing
Layout.topMargin: PlasmaCore.Units.smallSpacing * 2
Layout.leftMargin: PlasmaCore.Units.smallSpacing
}
// compact the layout
......
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