mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
units -> PlasmaCore.Units
This commit is contained in:
parent
30344fd697
commit
4bba6ac402
40 changed files with 168 additions and 168 deletions
|
|
@ -82,7 +82,7 @@ ColumnLayout {
|
|||
id: xAnim
|
||||
target: delegate
|
||||
from: delegate.x
|
||||
duration: units.longDuration
|
||||
duration: PlasmaCore.Units.longDuration
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
ScriptAction {
|
||||
|
|
@ -126,7 +126,7 @@ ColumnLayout {
|
|||
id: label
|
||||
text: model.name
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
x: units.smallSpacing
|
||||
x: PlasmaCore.Units.smallSpacing
|
||||
}
|
||||
PlasmaComponents.TextField {
|
||||
id: edit
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ Item {
|
|||
left: parent.left
|
||||
right: parent.right
|
||||
verticalCenter: parent.verticalCenter
|
||||
margins: units.gridUnit
|
||||
margins: PlasmaCore.Units.gridUnit
|
||||
}
|
||||
radius: height/2
|
||||
height: layout.implicitHeight + PlasmaCore.Units.largeSpacing
|
||||
|
|
@ -190,8 +190,8 @@ Item {
|
|||
|
||||
Kirigami.Icon {
|
||||
anchors.centerIn: parent
|
||||
width: units.iconSizes.small
|
||||
height: units.iconSizes.small
|
||||
width: PlasmaCore.Units.iconSizes.small
|
||||
height: PlasmaCore.Units.iconSizes.small
|
||||
// ToolButton cannot cope with QIcon
|
||||
source: modelData.icon || ""
|
||||
active: parent.hovered || parent.checked
|
||||
|
|
|
|||
|
|
@ -60,11 +60,11 @@ Item {
|
|||
signal dragStarted
|
||||
|
||||
readonly property int reservedSpaceForLabel: metrics.height
|
||||
property int availableCellHeight: units.iconSizes.huge + reservedSpaceForLabel
|
||||
property int availableCellHeight: PlasmaCore.Units.iconSizes.huge + reservedSpaceForLabel
|
||||
|
||||
property alias flickable: view
|
||||
|
||||
readonly property real openFactor: Math.min(1, Math.max(0, Math.min(1, (view.contentY + view.originY + view.height*2 - root.closedPositionOffset*2) / (units.gridUnit * 10))))
|
||||
readonly property real openFactor: Math.min(1, Math.max(0, Math.min(1, (view.contentY + view.originY + view.height*2 - root.closedPositionOffset*2) / (PlasmaCore.Units.gridUnit * 10))))
|
||||
|
||||
function open() {
|
||||
if (root.status === AppDrawer.Status.Open) {
|
||||
|
|
@ -114,7 +114,7 @@ Item {
|
|||
id: scrollAnim
|
||||
target: view
|
||||
properties: "contentY"
|
||||
duration: units.longDuration * 2
|
||||
duration: PlasmaCore.Units.longDuration * 2
|
||||
easing.type: Easing.OutQuad
|
||||
easing.amplitude: 2.0
|
||||
}
|
||||
|
|
@ -148,7 +148,7 @@ Item {
|
|||
rightMargin: -1
|
||||
}
|
||||
border.color: Qt.rgba(1, 1, 1, 0.5)
|
||||
radius: units.gridUnit
|
||||
radius: PlasmaCore.Units.gridUnit
|
||||
color: "black"
|
||||
opacity: 0.4 * root.openFactor
|
||||
height: root.height + radius * 2
|
||||
|
|
@ -181,7 +181,7 @@ Item {
|
|||
}
|
||||
|
||||
visible: root.status !== AppDrawer.Status.Closed
|
||||
cellWidth: view.width / Math.floor(view.width / ((root.availableCellHeight - root.reservedSpaceForLabel) + units.smallSpacing*4))
|
||||
cellWidth: view.width / Math.floor(view.width / ((root.availableCellHeight - root.reservedSpaceForLabel) + PlasmaCore.Units.smallSpacing*4))
|
||||
cellHeight: root.availableCellHeight
|
||||
clip: true
|
||||
|
||||
|
|
@ -258,11 +258,11 @@ Item {
|
|||
enabled: false
|
||||
Behavior on opacity {
|
||||
OpacityAnimator {
|
||||
duration: units.longDuration * 2
|
||||
duration: PlasmaCore.Units.longDuration * 2
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
}
|
||||
implicitWidth: Math.round(units.gridUnit/3)
|
||||
implicitWidth: Math.round(PlasmaCore.Units.gridUnit/3)
|
||||
contentItem: Rectangle {
|
||||
radius: width/2
|
||||
color: Qt.rgba(1, 1, 1, 0.3)
|
||||
|
|
@ -276,8 +276,8 @@ Item {
|
|||
left: parent.left
|
||||
right: parent.right
|
||||
bottom: parent.bottom
|
||||
leftMargin: units.gridUnit + root.leftPadding
|
||||
rightMargin: units.gridUnit + root.rightPadding
|
||||
leftMargin: PlasmaCore.Units.gridUnit + root.leftPadding
|
||||
rightMargin: PlasmaCore.Units.gridUnit + root.rightPadding
|
||||
bottomMargin: root.bottomPadding - height
|
||||
}
|
||||
height: 1
|
||||
|
|
@ -293,7 +293,7 @@ Item {
|
|||
opacity: root.status !== AppDrawer.Status.Closed ? 0.6 : 0
|
||||
Behavior on opacity {
|
||||
OpacityAnimator {
|
||||
duration: units.longDuration * 2
|
||||
duration: PlasmaCore.Units.longDuration * 2
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ MouseArea {
|
|||
if (model.applicationRunning) {
|
||||
delegate.launch(0, 0, "", model.applicationName, model.applicationStorageId);
|
||||
} else {
|
||||
delegate.launch(delegate.x + (units.smallSpacing * 2), delegate.y + (units.smallSpacing * 2), icon.source, model.applicationName, model.applicationStorageId);
|
||||
delegate.launch(delegate.x + (PlasmaCore.Units.smallSpacing * 2), delegate.y + (PlasmaCore.Units.smallSpacing * 2), icon.source, model.applicationName, model.applicationStorageId);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -49,10 +49,10 @@ MouseArea {
|
|||
ColumnLayout {
|
||||
anchors {
|
||||
fill: parent
|
||||
leftMargin: units.smallSpacing * 2
|
||||
topMargin: units.smallSpacing * 2
|
||||
rightMargin: units.smallSpacing * 2
|
||||
bottomMargin: units.smallSpacing * 2
|
||||
leftMargin: PlasmaCore.Units.smallSpacing * 2
|
||||
topMargin: PlasmaCore.Units.smallSpacing * 2
|
||||
rightMargin: PlasmaCore.Units.smallSpacing * 2
|
||||
bottomMargin: PlasmaCore.Units.smallSpacing * 2
|
||||
}
|
||||
spacing: 0
|
||||
|
||||
|
|
@ -74,7 +74,7 @@ MouseArea {
|
|||
}
|
||||
visible: model.applicationRunning
|
||||
radius: width
|
||||
width: units.smallSpacing
|
||||
width: PlasmaCore.Units.smallSpacing
|
||||
height: width
|
||||
color: PlasmaCore.Theme.highlightColor
|
||||
}
|
||||
|
|
@ -87,8 +87,8 @@ MouseArea {
|
|||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: delegate.reservedSpaceForLabel
|
||||
wrapMode: Text.WordWrap
|
||||
Layout.leftMargin: -parent.anchors.leftMargin + units.smallSpacing
|
||||
Layout.rightMargin: -parent.anchors.rightMargin + units.smallSpacing
|
||||
Layout.leftMargin: -parent.anchors.leftMargin + PlasmaCore.Units.smallSpacing
|
||||
Layout.rightMargin: -parent.anchors.rightMargin + PlasmaCore.Units.smallSpacing
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignTop
|
||||
maximumLineCount: 2
|
||||
|
|
|
|||
|
|
@ -27,13 +27,13 @@ LauncherContainer {
|
|||
|
||||
Behavior on height {
|
||||
NumberAnimation {
|
||||
duration: units.longDuration
|
||||
duration: PlasmaCore.Units.longDuration
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
}
|
||||
Behavior on opacity {
|
||||
OpacityAnimator {
|
||||
duration: units.longDuration * 4
|
||||
duration: PlasmaCore.Units.longDuration * 4
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ Flickable {
|
|||
id: scrollAnim
|
||||
target: mainFlickable
|
||||
properties: "contentX"
|
||||
duration: units.longDuration
|
||||
duration: PlasmaCore.Units.longDuration
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
|
||||
|
|
@ -197,7 +197,7 @@ Flickable {
|
|||
id: scrollLeftIndicator
|
||||
anchors {
|
||||
left: parent.left
|
||||
leftMargin: units.smallSpacing
|
||||
leftMargin: PlasmaCore.Units.smallSpacing
|
||||
}
|
||||
elementId: "left-arrow"
|
||||
}
|
||||
|
|
@ -205,7 +205,7 @@ Flickable {
|
|||
id: scrollRightIndicator
|
||||
anchors {
|
||||
right: parent.right
|
||||
rightMargin: units.smallSpacing
|
||||
rightMargin: PlasmaCore.Units.smallSpacing
|
||||
}
|
||||
elementId: "right-arrow"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -83,10 +83,10 @@ DragDrop.DropArea {
|
|||
|
||||
let scenePos = mapToItem(null, event.x, event.y);
|
||||
//SCROLL LEFT
|
||||
if (scenePos.x < units.gridUnit) {
|
||||
if (scenePos.x < PlasmaCore.Units.gridUnit) {
|
||||
mainFlickable.scrollLeft();
|
||||
//SCROLL RIGHT
|
||||
} else if (scenePos.x > mainFlickable.width - units.gridUnit) {
|
||||
} else if (scenePos.x > mainFlickable.width - PlasmaCore.Units.gridUnit) {
|
||||
mainFlickable.scrollRight();
|
||||
//DON't SCROLL
|
||||
} else {
|
||||
|
|
@ -183,10 +183,10 @@ DragDrop.DropArea {
|
|||
// Sets the containment in edit mode when we go in edit mode as well
|
||||
onEditModeChanged: plasmoid.editMode = editMode;
|
||||
|
||||
minimumItemWidth: units.gridUnit * 3
|
||||
minimumItemWidth: PlasmaCore.Units.gridUnit * 3
|
||||
minimumItemHeight: minimumItemWidth
|
||||
|
||||
defaultItemWidth: units.gridUnit * 6
|
||||
defaultItemWidth: PlasmaCore.Units.gridUnit * 6
|
||||
defaultItemHeight: defaultItemWidth
|
||||
|
||||
acceptsAppletCallback: function(applet, x, y) {
|
||||
|
|
|
|||
|
|
@ -19,9 +19,9 @@ Item {
|
|||
id: root
|
||||
|
||||
readonly property int reservedSpaceForLabel: metrics.height
|
||||
readonly property int cellWidth: root.width / Math.floor(root.width / ((availableCellHeight - reservedSpaceForLabel) + units.smallSpacing*4))
|
||||
readonly property int cellWidth: root.width / Math.floor(root.width / ((availableCellHeight - reservedSpaceForLabel) + PlasmaCore.Units.smallSpacing*4))
|
||||
readonly property int cellHeight: availableCellHeight
|
||||
property int availableCellHeight: units.iconSizes.huge + reservedSpaceForLabel
|
||||
property int availableCellHeight: PlasmaCore.Units.iconSizes.huge + reservedSpaceForLabel
|
||||
|
||||
property ContainmentLayoutManager.AppletsLayout appletsLayout
|
||||
|
||||
|
|
@ -29,7 +29,7 @@ Item {
|
|||
property alias flow: applicationsFlow
|
||||
|
||||
implicitWidth: frame.implicitWidth
|
||||
implicitHeight: Math.max(units.gridUnit*3, frame.implicitHeight)
|
||||
implicitHeight: Math.max(PlasmaCore.Units.gridUnit*3, frame.implicitHeight)
|
||||
|
||||
Controls.Label {
|
||||
id: metrics
|
||||
|
|
@ -40,7 +40,7 @@ Item {
|
|||
|
||||
Item {
|
||||
id: spacer
|
||||
width: units.gridUnit * 4
|
||||
width: PlasmaCore.Units.gridUnit * 4
|
||||
height: width
|
||||
}
|
||||
|
||||
|
|
@ -68,7 +68,7 @@ Item {
|
|||
|
||||
move: Transition {
|
||||
NumberAnimation {
|
||||
duration: units.longDuration
|
||||
duration: PlasmaCore.Units.longDuration
|
||||
easing.type: Easing.InOutQuad
|
||||
properties: "x,y"
|
||||
}
|
||||
|
|
@ -77,7 +77,7 @@ Item {
|
|||
}
|
||||
Behavior on implicitWidth {
|
||||
NumberAnimation {
|
||||
duration: units.longDuration
|
||||
duration: PlasmaCore.Units.longDuration
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ LauncherContainer {
|
|||
id: root
|
||||
|
||||
readonly property int columns: Math.floor(root.flow.width / cellWidth)
|
||||
readonly property int cellWidth: root.flow.width / Math.floor(root.flow.width / ((availableCellHeight - reservedSpaceForLabel) + units.smallSpacing*4))
|
||||
readonly property int cellWidth: root.flow.width / Math.floor(root.flow.width / ((availableCellHeight - reservedSpaceForLabel) + PlasmaCore.Units.smallSpacing*4))
|
||||
readonly property int cellHeight: availableCellHeight
|
||||
|
||||
signal launched
|
||||
|
|
|
|||
|
|
@ -72,10 +72,10 @@ Repeater {
|
|||
var pos = plasmoid.fullRepresentationItem.mapFromItem(delegate, dragCenter.x, dragCenter.y);
|
||||
|
||||
//SCROLL LEFT
|
||||
if (pos.x < units.gridUnit) {
|
||||
if (pos.x < PlasmaCore.Units.gridUnit) {
|
||||
launcherRepeater.scrollLeftRequested();
|
||||
//SCROLL RIGHT
|
||||
} else if (pos.x > mainFlickable.width - units.gridUnit) {
|
||||
} else if (pos.x > mainFlickable.width - PlasmaCore.Units.gridUnit) {
|
||||
launcherRepeater.scrollRightRequested();
|
||||
//DON't SCROLL
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -59,10 +59,10 @@ ContainmentLayoutManager.BasicAppletContainer {
|
|||
var pos = plasmoid.fullRepresentationItem.mapFromItem(appletContainer, dragCenter.x, dragCenter.y);
|
||||
|
||||
//SCROLL LEFT
|
||||
if (pos.x < units.gridUnit) {
|
||||
if (pos.x < PlasmaCore.Units.gridUnit) {
|
||||
launcherRepeater.scrollLeftRequested();
|
||||
//SCROLL RIGHT
|
||||
} else if (pos.x > mainFlickable.width - units.gridUnit) {
|
||||
} else if (pos.x > mainFlickable.width - PlasmaCore.Units.gridUnit) {
|
||||
launcherRepeater.scrollRightRequested();
|
||||
//DON't SCROLL
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ PlasmaCore.ToolTipArea {
|
|||
property alias elementId: icon.elementId
|
||||
property QtObject action
|
||||
property bool backgroundVisible: false
|
||||
property int iconSize: units.iconSizes.large
|
||||
property int iconSize: PlasmaCore.Units.iconSizes.large
|
||||
property int pressedOffset: 1
|
||||
property bool checked: false
|
||||
property bool toggle: false
|
||||
|
|
@ -35,7 +35,7 @@ PlasmaCore.ToolTipArea {
|
|||
|
||||
Behavior on opacity {
|
||||
NumberAnimation {
|
||||
duration: units.longDuration
|
||||
duration: PlasmaCore.Units.longDuration
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ MouseArea {
|
|||
property Flickable flickable
|
||||
property real factor: 0
|
||||
|
||||
height: units.iconSizes.medium
|
||||
height: PlasmaCore.Units.iconSizes.medium
|
||||
signal openRequested
|
||||
signal closeRequested
|
||||
|
||||
|
|
@ -41,7 +41,7 @@ MouseArea {
|
|||
Item {
|
||||
anchors.centerIn: parent
|
||||
|
||||
width: units.iconSizes.medium
|
||||
width: PlasmaCore.Units.iconSizes.medium
|
||||
height: width
|
||||
|
||||
Rectangle {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ PlasmaCore.SvgItem {
|
|||
colorGroup: PlasmaCore.Theme.ComplementaryColorGroup
|
||||
}
|
||||
elementId: "left-arrow"
|
||||
width: units.iconSizes.large
|
||||
width: PlasmaCore.Units.iconSizes.large
|
||||
height: width
|
||||
layer.enabled: true
|
||||
layer.effect: DropShadow {
|
||||
|
|
@ -33,7 +33,7 @@ PlasmaCore.SvgItem {
|
|||
}
|
||||
Behavior on opacity {
|
||||
OpacityAnimator {
|
||||
duration: units.longDuration * 2
|
||||
duration: PlasmaCore.Units.longDuration * 2
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ PlasmaCore.ToolTipArea {
|
|||
case PlasmaCore.Types.Horizontal:
|
||||
return height;
|
||||
default:
|
||||
return units.gridUnit * 3;
|
||||
return PlasmaCore.Units.gridUnit * 3;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -55,7 +55,7 @@ PlasmaCore.ToolTipArea {
|
|||
case PlasmaCore.Types.Horizontal:
|
||||
return 0;
|
||||
default:
|
||||
return units.gridUnit * 3;
|
||||
return PlasmaCore.Units.gridUnit * 3;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ Item {
|
|||
top: parent.top
|
||||
bottom: parent.bottom
|
||||
right: parent.right
|
||||
rightMargin: units.smallSpacing
|
||||
rightMargin: PlasmaCore.Units.smallSpacing
|
||||
}
|
||||
Indicators.Bluetooth { provider: bluetoothProvider }
|
||||
Indicators.Wifi { provider: wifiProvider }
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ NanoShell.FullScreenOverlay {
|
|||
readonly property int openedContentY: wideScreen || offset > (collapsedHeight + openThreshold) ? -topEmptyAreaHeight : offsetToContentY(collapsedHeight)
|
||||
readonly property int closedContentY: mainFlickable.contentHeight
|
||||
|
||||
readonly property bool wideScreen: width > height || width > units.gridUnit * 45
|
||||
readonly property bool wideScreen: width > height || width > PlasmaCore.Units.gridUnit * 45
|
||||
readonly property int drawerWidth: wideScreen ? contentItem.implicitWidth : width
|
||||
|
||||
property int drawerX: 0
|
||||
|
|
@ -99,7 +99,7 @@ NanoShell.FullScreenOverlay {
|
|||
function updateState() {
|
||||
cancelAnimations();
|
||||
if (window.offset <= 0) {
|
||||
// close immediately, so that we don't have to wait units.longDuration
|
||||
// close immediately, so that we don't have to wait PlasmaCore.Units.longDuration
|
||||
window.visible = false;
|
||||
close();
|
||||
} else if (window.direction === SlidingContainer.MovementDirection.None) {
|
||||
|
|
|
|||
|
|
@ -246,7 +246,7 @@ Item {
|
|||
|
||||
z: 4
|
||||
Layout.alignment: Qt.AlignTop
|
||||
Layout.preferredWidth: slidingPanel.wideScreen ? Math.min(slidingPanel.width/2, units.gridUnit * 25) : panelContents.width
|
||||
Layout.preferredWidth: slidingPanel.wideScreen ? Math.min(slidingPanel.width/2, PlasmaCore.Units.gridUnit * 25) : panelContents.width
|
||||
|
||||
parentSlidingPanel: slidingPanel
|
||||
onExpandRequested: slidingPanel.expand()
|
||||
|
|
@ -256,10 +256,10 @@ Item {
|
|||
// notifications and media player
|
||||
ListView {
|
||||
id: fullRepresentationView
|
||||
implicitHeight: units.gridUnit * 20
|
||||
implicitHeight: PlasmaCore.Units.gridUnit * 20
|
||||
Layout.preferredWidth: slidingPanel.wideScreen ? Math.min(slidingPanel.width/2, quickSettings.width*fullRepresentationModel.count) : panelContents.width
|
||||
Layout.preferredHeight: slidingPanel.wideScreen
|
||||
? Math.min(units.gridUnit * 20, Math.max(units.gridUnit * 15, quickSettings.implicitHeight))
|
||||
? Math.min(PlasmaCore.Units.gridUnit * 20, Math.max(PlasmaCore.Units.gridUnit * 15, quickSettings.implicitHeight))
|
||||
: Math.min(plasmoid.screenGeometry.height - quickSettings.implicitHeight - bottomBar.height + slidingPanel.topEmptyAreaHeight, implicitHeight)
|
||||
|
||||
z: 1
|
||||
|
|
@ -279,7 +279,7 @@ Item {
|
|||
cacheBuffer: width * 100
|
||||
highlightFollowsCurrentItem: true
|
||||
highlightRangeMode: ListView.ApplyRange
|
||||
highlightMoveDuration: units.longDuration
|
||||
highlightMoveDuration: PlasmaCore.Units.longDuration
|
||||
snapMode: slidingPanel.wideScreen ? ListView.NoSnap : ListView.SnapOneItem
|
||||
model: ObjectModel {
|
||||
id: fullRepresentationModel
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import org.kde.plasma.private.nanoshell 2.0 as NanoShell
|
|||
|
||||
ColumnLayout {
|
||||
id: delegateRoot
|
||||
spacing: units.smallSpacing
|
||||
spacing: PlasmaCore.Units.smallSpacing
|
||||
|
||||
signal closeRequested
|
||||
signal panelClosed
|
||||
|
|
@ -99,7 +99,7 @@ ColumnLayout {
|
|||
Layout.alignment: Qt.AlignHCenter
|
||||
|
||||
text: delegateRoot.text
|
||||
bottomPadding: units.smallSpacing * 2
|
||||
bottomPadding: PlasmaCore.Units.smallSpacing * 2
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
font.pixelSize: PlasmaCore.Theme.defaultFont.pixelSize * 0.8
|
||||
elide: Text.ElideRight
|
||||
|
|
@ -109,10 +109,10 @@ ColumnLayout {
|
|||
anchors {
|
||||
left: parent.right
|
||||
verticalCenter: parent.verticalCenter
|
||||
verticalCenterOffset: -units.smallSpacing
|
||||
verticalCenterOffset: -PlasmaCore.Units.smallSpacing
|
||||
}
|
||||
visible: delegateRoot.settingsCommand
|
||||
width: units.iconSizes.small/2
|
||||
width: PlasmaCore.Units.iconSizes.small/2
|
||||
height: width
|
||||
elementId: "down-arrow"
|
||||
svg: PlasmaCore.Svg {
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ Item {
|
|||
}
|
||||
|
||||
signal plasmoidTriggered(var applet, var id)
|
||||
Layout.minimumHeight: flow.implicitHeight + units.largeSpacing*2
|
||||
Layout.minimumHeight: flow.implicitHeight + PlasmaCore.Units.largeSpacing*2
|
||||
|
||||
onClosed: quickSettingsModel.panelClosed()
|
||||
|
||||
|
|
@ -94,7 +94,7 @@ Item {
|
|||
spacing: 0
|
||||
height: Layout.minimumHeight * (1 - root.expandedRatio) + (Layout.maximumHeight * root.expandedRatio)
|
||||
|
||||
readonly property real cellSizeHint: units.iconSizes.large + units.smallSpacing * 6
|
||||
readonly property real cellSizeHint: PlasmaCore.Units.iconSizes.large + PlasmaCore.Units.smallSpacing * 6
|
||||
readonly property real columnWidth: Math.floor(width / Math.floor(width / cellSizeHint))
|
||||
|
||||
// top indicators (clock, widgets, etc.)
|
||||
|
|
@ -125,7 +125,7 @@ Item {
|
|||
Layout.preferredHeight: implicitHeight
|
||||
Layout.maximumHeight: (flow.cellSizeHint * Math.ceil((flow.children.length - 1) / flow.columns))
|
||||
|
||||
readonly property real cellSizeHint: units.iconSizes.large + units.smallSpacing * 6
|
||||
readonly property real cellSizeHint: PlasmaCore.Units.iconSizes.large + PlasmaCore.Units.smallSpacing * 6
|
||||
readonly property real columns: Math.floor(width / cellSizeHint)
|
||||
readonly property real columnWidth: Math.floor(width / columns)
|
||||
|
||||
|
|
@ -162,7 +162,7 @@ Item {
|
|||
|
||||
move: Transition {
|
||||
NumberAnimation {
|
||||
duration: units.shortDuration
|
||||
duration: PlasmaCore.Units.shortDuration
|
||||
easing.type: Easing.Linear
|
||||
properties: "x,y"
|
||||
}
|
||||
|
|
@ -170,10 +170,10 @@ Item {
|
|||
}
|
||||
BrightnessItem {
|
||||
id: brightnessSlider
|
||||
Layout.topMargin: units.largeSpacing
|
||||
Layout.bottomMargin: units.smallSpacing
|
||||
Layout.leftMargin: units.largeSpacing
|
||||
Layout.rightMargin: units.largeSpacing
|
||||
Layout.topMargin: PlasmaCore.Units.largeSpacing
|
||||
Layout.bottomMargin: PlasmaCore.Units.smallSpacing
|
||||
Layout.leftMargin: PlasmaCore.Units.largeSpacing
|
||||
Layout.rightMargin: PlasmaCore.Units.largeSpacing
|
||||
Layout.fillWidth: true
|
||||
|
||||
opacity: root.expandedRatio
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ Item {
|
|||
}
|
||||
NumberAnimation on opacity {
|
||||
id: opacityAnimator
|
||||
duration: units.shortDuration
|
||||
duration: PlasmaCore.Units.shortDuration
|
||||
easing.type: Easing.InOutQuad
|
||||
onFinished: {
|
||||
// animate the state back
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ Item {
|
|||
Item {
|
||||
anchors {
|
||||
fill: parent
|
||||
margins: units.smallSpacing
|
||||
margins: PlasmaCore.Units.smallSpacing
|
||||
}
|
||||
|
||||
SequentialAnimation {
|
||||
|
|
@ -65,7 +65,7 @@ Item {
|
|||
id: internalSlideAnim
|
||||
target: background
|
||||
properties: "x"
|
||||
duration: units.longDuration
|
||||
duration: PlasmaCore.Units.longDuration
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
ScriptAction {
|
||||
|
|
@ -81,7 +81,7 @@ Item {
|
|||
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
radius: units.smallSpacing
|
||||
radius: PlasmaCore.Units.smallSpacing
|
||||
color: PlasmaCore.Theme.backgroundColor
|
||||
opacity: 1 * (1-Math.abs(x)/width)
|
||||
|
||||
|
|
@ -112,13 +112,13 @@ Item {
|
|||
ColumnLayout {
|
||||
anchors {
|
||||
fill: parent
|
||||
margins: units.smallSpacing
|
||||
margins: PlasmaCore.Units.smallSpacing
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
z: 99
|
||||
Layout.fillWidth: true
|
||||
Layout.maximumHeight: units.gridUnit
|
||||
Layout.maximumHeight: PlasmaCore.Units.gridUnit
|
||||
PlasmaCore.IconItem {
|
||||
Layout.fillHeight: true
|
||||
Layout.preferredWidth: height
|
||||
|
|
@ -149,8 +149,8 @@ Item {
|
|||
PlasmaComponents.ToolButton {
|
||||
z: 99
|
||||
icon.name: "window-close"
|
||||
icon.width: units.iconSizes.medium
|
||||
icon.height: units.iconSizes.medium
|
||||
icon.width: PlasmaCore.Units.iconSizes.medium
|
||||
icon.height: PlasmaCore.Units.iconSizes.medium
|
||||
onClicked: {
|
||||
slideAnim.to = -background.width*2;
|
||||
slideAnim.running = true;
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ NanoShell.FullScreenOverlay {
|
|||
width: Screen.width
|
||||
height: Screen.height
|
||||
property int offset: 0
|
||||
property int overShoot: units.gridUnit * 2
|
||||
property int overShoot: PlasmaCore.Units.gridUnit * 2
|
||||
property int tasksCount: window.model.count
|
||||
property int currentTaskIndex: -1
|
||||
property TaskManager.TasksModel model
|
||||
|
|
@ -122,7 +122,7 @@ NanoShell.FullScreenOverlay {
|
|||
id: internalAnim
|
||||
target: tasksView
|
||||
properties: "contentY"
|
||||
duration: units.longDuration
|
||||
duration: PlasmaCore.Units.longDuration
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
ScriptAction {
|
||||
|
|
@ -160,7 +160,7 @@ NanoShell.FullScreenOverlay {
|
|||
target: window.contentItem
|
||||
from: 1
|
||||
to: 0
|
||||
duration: units.longDuration
|
||||
duration: PlasmaCore.Units.longDuration
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
ScaleAnimator {
|
||||
|
|
@ -168,7 +168,7 @@ NanoShell.FullScreenOverlay {
|
|||
from: 1
|
||||
to: 2
|
||||
// To try tosync up with kwin animation
|
||||
duration: units.longDuration * 0.85
|
||||
duration: PlasmaCore.Units.longDuration * 0.85
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
}
|
||||
|
|
@ -280,7 +280,7 @@ NanoShell.FullScreenOverlay {
|
|||
|
||||
Behavior on y {
|
||||
NumberAnimation {
|
||||
duration: units.longDuration
|
||||
duration: PlasmaCore.Units.longDuration
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
}
|
||||
|
|
@ -294,7 +294,7 @@ NanoShell.FullScreenOverlay {
|
|||
enabled: false
|
||||
NumberAnimation {
|
||||
properties: "x,y"
|
||||
duration: units.longDuration
|
||||
duration: PlasmaCore.Units.longDuration
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
}
|
||||
|
|
@ -309,8 +309,8 @@ NanoShell.FullScreenOverlay {
|
|||
bottom: parent.bottom
|
||||
}
|
||||
icon.name: "start-here-kde"
|
||||
icon.width: units.iconSizes.medium
|
||||
icon.height: units.iconSizes.medium
|
||||
icon.width: PlasmaCore.Units.iconSizes.medium
|
||||
icon.height: PlasmaCore.Units.iconSizes.medium
|
||||
onClicked: {
|
||||
currentTaskIndex = -1;
|
||||
window.hide();
|
||||
|
|
|
|||
|
|
@ -23,15 +23,15 @@ Item {
|
|||
|
||||
activeFocusOnTab: true
|
||||
|
||||
property int iconSize: units.gridUnit * 3
|
||||
property int iconSize: PlasmaCore.Units.gridUnit * 3
|
||||
|
||||
implicitWidth: Math.max(iconSize + units.largeSpacing * 2, label.contentWidth)
|
||||
implicitHeight: iconSize + units.smallSpacing + label.implicitHeight
|
||||
implicitWidth: Math.max(iconSize + PlasmaCore.Units.largeSpacing * 2, label.contentWidth)
|
||||
implicitHeight: iconSize + PlasmaCore.Units.smallSpacing + label.implicitHeight
|
||||
|
||||
opacity: activeFocus || containsMouse ? 1 : 0.85
|
||||
Behavior on opacity {
|
||||
PropertyAnimation { // OpacityAnimator makes it turn black at random intervals
|
||||
duration: units.longDuration
|
||||
duration: PlasmaCore.Units.longDuration
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
}
|
||||
|
|
@ -39,14 +39,14 @@ Item {
|
|||
Rectangle {
|
||||
id: iconCircle
|
||||
anchors.centerIn: icon
|
||||
width: iconSize + units.smallSpacing
|
||||
width: iconSize + PlasmaCore.Units.smallSpacing
|
||||
height: width
|
||||
radius: width / 2
|
||||
color: softwareRendering ? PlasmaCore.ColorScope.backgroundColor : PlasmaCore.ColorScope.textColor
|
||||
opacity: activeFocus || containsMouse ? (softwareRendering ? 0.8 : 0.15) : (softwareRendering ? 0.6 : 0)
|
||||
Behavior on opacity {
|
||||
PropertyAnimation { // OpacityAnimator makes it turn black at random intervals
|
||||
duration: units.longDuration
|
||||
duration: PlasmaCore.Units.longDuration
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
}
|
||||
|
|
@ -62,7 +62,7 @@ Item {
|
|||
opacity: 0.15
|
||||
Behavior on scale {
|
||||
PropertyAnimation {
|
||||
duration: units.shortDuration
|
||||
duration: PlasmaCore.Units.shortDuration
|
||||
easing.type: Easing.InOutQuart
|
||||
}
|
||||
}
|
||||
|
|
@ -86,7 +86,7 @@ Item {
|
|||
font.pointSize: Math.max(fontSize + 1,PlasmaCore.Theme.defaultFont.pointSize + 1)
|
||||
anchors {
|
||||
top: icon.bottom
|
||||
topMargin: (softwareRendering ? 1.5 : 1) * units.smallSpacing
|
||||
topMargin: (softwareRendering ? 1.5 : 1) * PlasmaCore.Units.smallSpacing
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import org.kde.plasma.components 2.0 as PlasmaComponents
|
|||
PlasmaComponents.Label {
|
||||
horizontalAlignment: Qt.AlignHCenter
|
||||
verticalAlignment: Qt.AlignVCenter
|
||||
font.pixelSize: units.gridUnit * 1.6
|
||||
font.pixelSize: PlasmaCore.Units.gridUnit * 1.6
|
||||
property alias sub: longHold.text
|
||||
property var callback
|
||||
Layout.fillWidth: true
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import QtQuick 2.0
|
|||
import org.kde.plasma.core 2.0 as PlasmaCore
|
||||
|
||||
Item {
|
||||
width: units.iconSizes.smallMedium
|
||||
width: PlasmaCore.Units.iconSizes.smallMedium
|
||||
height: width
|
||||
property var callback
|
||||
property string text
|
||||
|
|
@ -11,7 +11,7 @@ Item {
|
|||
|
||||
PlasmaCore.IconItem {
|
||||
id: icon
|
||||
width: units.iconSizes.medium
|
||||
width: PlasmaCore.Units.iconSizes.medium
|
||||
height: width
|
||||
anchors.centerIn: parent
|
||||
colorGroup: PlasmaCore.ColorScope.colorGroup
|
||||
|
|
|
|||
|
|
@ -29,13 +29,13 @@ Item {
|
|||
property int fontSize: config.fontSize
|
||||
signal clicked()
|
||||
|
||||
property real faceSize: Math.min(width, height - usernameDelegate.height - units.smallSpacing)
|
||||
property real faceSize: Math.min(width, height - usernameDelegate.height - PlasmaCore.Units.smallSpacing)
|
||||
|
||||
opacity: isCurrent ? 1.0 : 0.5
|
||||
|
||||
Behavior on opacity {
|
||||
OpacityAnimator {
|
||||
duration: units.longDuration
|
||||
duration: PlasmaCore.Units.longDuration
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -54,16 +54,16 @@ Item {
|
|||
id: imageSource
|
||||
anchors {
|
||||
bottom: usernameDelegate.top
|
||||
bottomMargin: units.largeSpacing
|
||||
bottomMargin: PlasmaCore.Units.largeSpacing
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
Behavior on width {
|
||||
PropertyAnimation {
|
||||
from: faceSize
|
||||
duration: units.longDuration * 2;
|
||||
duration: PlasmaCore.Units.longDuration * 2;
|
||||
}
|
||||
}
|
||||
width: isCurrent ? faceSize : faceSize - units.largeSpacing
|
||||
width: isCurrent ? faceSize : faceSize - PlasmaCore.Units.largeSpacing
|
||||
height: width
|
||||
|
||||
//Image takes priority, taking a full path to a file, if that doesn't exist we show an icon
|
||||
|
|
@ -80,7 +80,7 @@ Item {
|
|||
source: iconSource
|
||||
visible: (face.status == Image.Error || face.status == Image.Null)
|
||||
anchors.fill: parent
|
||||
anchors.margins: units.gridUnit * 0.5 // because mockup says so...
|
||||
anchors.margins: PlasmaCore.Units.gridUnit * 0.5 // because mockup says so...
|
||||
colorGroup: PlasmaCore.ColorScope.colorGroup
|
||||
}
|
||||
}
|
||||
|
|
@ -88,7 +88,7 @@ Item {
|
|||
ShaderEffect {
|
||||
anchors {
|
||||
bottom: usernameDelegate.top
|
||||
bottomMargin: units.largeSpacing
|
||||
bottomMargin: PlasmaCore.Units.largeSpacing
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ ColumnLayout {
|
|||
|
||||
property int alignment
|
||||
Layout.alignment: alignment
|
||||
spacing: units.gridUnit
|
||||
spacing: Units.gridUnit
|
||||
|
||||
Label {
|
||||
text: Qt.formatTime(timeSource.data["Local"]["DateTime"], root.is24HourTime ? "h:mm" : "h:mm ap")
|
||||
|
|
|
|||
|
|
@ -37,6 +37,6 @@ MouseArea {
|
|||
target: delegate
|
||||
property: "x"
|
||||
to: 0
|
||||
duration: units.longDuration
|
||||
duration: PlasmaCore.Units.longDuration
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -133,18 +133,18 @@ Rectangle {
|
|||
right: parent.right
|
||||
top: passwordBar.bottom
|
||||
bottom: parent.bottom
|
||||
topMargin: units.gridUnit
|
||||
bottomMargin: units.gridUnit
|
||||
topMargin: PlasmaCore.Units.gridUnit
|
||||
bottomMargin: PlasmaCore.Units.gridUnit
|
||||
}
|
||||
spacing: units.gridUnit
|
||||
spacing: PlasmaCore.Units.gridUnit
|
||||
|
||||
GridLayout {
|
||||
property string thePw
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
||||
Layout.leftMargin: units.gridUnit * 0.5
|
||||
Layout.rightMargin: units.gridUnit * 0.5
|
||||
Layout.maximumWidth: units.gridUnit * 22
|
||||
Layout.maximumHeight: units.gridUnit * 12.5
|
||||
Layout.leftMargin: PlasmaCore.Units.gridUnit * 0.5
|
||||
Layout.rightMargin: PlasmaCore.Units.gridUnit * 0.5
|
||||
Layout.maximumWidth: PlasmaCore.Units.gridUnit * 22
|
||||
Layout.maximumHeight: PlasmaCore.Units.gridUnit * 12.5
|
||||
columns: 4
|
||||
|
||||
// numpad keys
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ PlasmaCore.ColorScope {
|
|||
property: "contentY"
|
||||
from: 0
|
||||
to: passwordFlickable.contentHeight - passwordFlickable.height
|
||||
duration: units.longDuration
|
||||
duration: PlasmaCore.Units.longDuration
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
|
||||
|
|
@ -79,7 +79,7 @@ PlasmaCore.ColorScope {
|
|||
left: parent.left
|
||||
right: parent.right
|
||||
}
|
||||
height: units.gridUnit
|
||||
height: PlasmaCore.Units.gridUnit
|
||||
opacity: 1 - (passwordFlickable.contentY / passwordFlickable.columnHeight)
|
||||
sourceComponent: SimpleHeaderBar {}
|
||||
}
|
||||
|
|
@ -124,7 +124,7 @@ PlasmaCore.ColorScope {
|
|||
Clock {
|
||||
id: phoneClock
|
||||
alignment: Qt.AlignHCenter
|
||||
Layout.bottomMargin: units.gridUnit * 2 // keep spacing even if media controls are gone
|
||||
Layout.bottomMargin: PlasmaCore.Units.gridUnit * 2 // keep spacing even if media controls are gone
|
||||
}
|
||||
MediaControls {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
|
|
@ -222,7 +222,7 @@ PlasmaCore.ColorScope {
|
|||
PlasmaCore.IconItem {
|
||||
id: scrollUpIcon
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: units.gridUnit + passwordFlickable.contentY * 0.5
|
||||
anchors.bottomMargin: PlasmaCore.Units.gridUnit + passwordFlickable.contentY * 0.5
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
opacity: 1 - (passwordFlickable.contentY / passwordFlickable.columnHeight)
|
||||
|
||||
|
|
@ -235,7 +235,7 @@ PlasmaCore.ColorScope {
|
|||
|
||||
anchors.fill: parent
|
||||
|
||||
property int columnHeight: units.gridUnit * 20
|
||||
property int columnHeight: PlasmaCore.Units.gridUnit * 20
|
||||
property int oldContentY: contentY
|
||||
|
||||
height: columnHeight + root.height
|
||||
|
|
@ -266,7 +266,7 @@ PlasmaCore.ColorScope {
|
|||
anchors.bottom: parent.bottom
|
||||
|
||||
width: parent.width
|
||||
spacing: units.gridUnit
|
||||
spacing: PlasmaCore.Units.gridUnit
|
||||
|
||||
// scroll down icon
|
||||
PlasmaCore.IconItem {
|
||||
|
|
|
|||
|
|
@ -20,9 +20,9 @@ Item {
|
|||
RowLayout {
|
||||
id: controlsRow
|
||||
anchors.bottom: parent.bottom
|
||||
y: units.smallSpacing // some distance to the password field
|
||||
y: PlasmaCore.Units.smallSpacing // some distance to the password field
|
||||
width: parent.width
|
||||
height: units.gridUnit * 3
|
||||
height: PlasmaCore.Units.gridUnit * 3
|
||||
spacing: 0
|
||||
|
||||
enabled: mpris2Source.canControl
|
||||
|
|
@ -94,7 +94,7 @@ Item {
|
|||
}
|
||||
|
||||
Item { // spacer
|
||||
width: units.smallSpacing
|
||||
width: PlasmaCore.Units.smallSpacing
|
||||
height: 1
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,15 +26,15 @@ RowLayout {
|
|||
// false for displaying the value as normal text
|
||||
property bool showingProgress: false
|
||||
|
||||
spacing: units.smallSpacing
|
||||
spacing: PlasmaCore.Units.smallSpacing
|
||||
|
||||
width: Math.max(Math.min(Screen.desktopAvailableWidth / 2, implicitWidth), units.gridUnit * 15)
|
||||
height: units.iconSizes.medium
|
||||
width: Math.max(Math.min(Screen.desktopAvailableWidth / 2, implicitWidth), PlasmaCore.Units.gridUnit * 15)
|
||||
height: PlasmaCore.Units.iconSizes.medium
|
||||
|
||||
PlasmaCore.IconItem {
|
||||
Layout.leftMargin: units.smallSpacing
|
||||
Layout.preferredWidth: units.iconSizes.medium
|
||||
Layout.preferredHeight: units.iconSizes.medium
|
||||
Layout.leftMargin: PlasmaCore.Units.smallSpacing
|
||||
Layout.preferredWidth: PlasmaCore.Units.iconSizes.medium
|
||||
Layout.preferredHeight: PlasmaCore.Units.iconSizes.medium
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
source: icon
|
||||
visible: valid
|
||||
|
|
@ -46,7 +46,7 @@ RowLayout {
|
|||
Layout.alignment: Qt.AlignVCenter
|
||||
// So it never exceeds the minimum popup size
|
||||
Layout.preferredWidth: 1
|
||||
Layout.rightMargin: units.smallSpacing
|
||||
Layout.rightMargin: PlasmaCore.Units.smallSpacing
|
||||
visible: showingProgress
|
||||
from: 0
|
||||
to: osdMaxValue
|
||||
|
|
@ -66,7 +66,7 @@ RowLayout {
|
|||
id: percentageLabel
|
||||
Layout.fillHeight: true
|
||||
Layout.preferredWidth: widestLabelSize.width
|
||||
Layout.rightMargin: units.smallSpacing
|
||||
Layout.rightMargin: PlasmaCore.Units.smallSpacing
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
level: 3
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
|
|
@ -93,7 +93,7 @@ RowLayout {
|
|||
id: label
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
Layout.rightMargin: units.smallSpacing
|
||||
Layout.rightMargin: PlasmaCore.Units.smallSpacing
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
level: 3
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ import org.kde.plasma.workspace.keyboardlayout 1.0 as Keyboards
|
|||
|
||||
Rectangle {
|
||||
id: root
|
||||
implicitHeight: units.gridUnit * 2.5
|
||||
implicitHeight: PlasmaCore.Units.gridUnit * 2.5
|
||||
|
||||
// toggle between pin and password mode
|
||||
property bool isPinMode: true
|
||||
|
|
@ -182,7 +182,7 @@ Rectangle {
|
|||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.margins: units.smallSpacing
|
||||
anchors.margins: PlasmaCore.Units.smallSpacing
|
||||
implicitWidth: height
|
||||
icon.name: "input-keyboard-virtual-symbolic"
|
||||
onClicked: {
|
||||
|
|
@ -212,7 +212,7 @@ Rectangle {
|
|||
|
||||
ListView {
|
||||
id: dotDisplay
|
||||
property int dotWidth: Math.round(units.gridUnit * 0.35)
|
||||
property int dotWidth: Math.round(PlasmaCore.Units.gridUnit * 0.35)
|
||||
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
||||
Layout.bottomMargin: Math.round(dotWidth / 2)
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ PlasmaCore.ColorScope {
|
|||
top: parent.top
|
||||
bottom: parent.bottom
|
||||
right: parent.right
|
||||
rightMargin: units.smallSpacing
|
||||
rightMargin: PlasmaCore.Units.smallSpacing
|
||||
}
|
||||
Indicators.Bluetooth {}
|
||||
Indicators.Wifi {}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ Item {
|
|||
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
height: notifLayout.height + units.gridUnit
|
||||
height: notifLayout.height + PlasmaCore.Units.gridUnit
|
||||
|
||||
opacity: 1 - Math.min(1, 1.5 * Math.abs(rect.x) / width) // opacity during dismiss swipe
|
||||
|
||||
|
|
@ -57,20 +57,20 @@ Item {
|
|||
id: notifLayout
|
||||
anchors {
|
||||
left: parent.left
|
||||
leftMargin: units.gridUnit * 0.5
|
||||
leftMargin: PlasmaCore.Units.gridUnit * 0.5
|
||||
right: parent.right
|
||||
rightMargin: units.gridUnit * 0.5
|
||||
rightMargin: PlasmaCore.Units.gridUnit * 0.5
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
spacing: units.smallSpacing / 2
|
||||
spacing: PlasmaCore.Units.smallSpacing / 2
|
||||
// notif body
|
||||
ColumnLayout {
|
||||
id: textLayout
|
||||
Layout.fillWidth: true
|
||||
Layout.alignment: Qt.AlignVCenter | Qt.AlignLeft
|
||||
spacing: units.gridUnit / 2
|
||||
spacing: PlasmaCore.Units.gridUnit / 2
|
||||
|
||||
Label {
|
||||
text: notification.summary
|
||||
|
|
@ -97,10 +97,10 @@ Item {
|
|||
id: iconContainer
|
||||
|
||||
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
|
||||
Layout.preferredWidth: units.iconSizes.large
|
||||
Layout.preferredHeight: units.iconSizes.large
|
||||
Layout.topMargin: units.smallSpacing
|
||||
Layout.bottomMargin: units.smallSpacing
|
||||
Layout.preferredWidth: PlasmaCore.Units.iconSizes.large
|
||||
Layout.preferredHeight: PlasmaCore.Units.iconSizes.large
|
||||
Layout.topMargin: PlasmaCore.Units.smallSpacing
|
||||
Layout.bottomMargin: PlasmaCore.Units.smallSpacing
|
||||
|
||||
visible: iconItem.active || imageItem.active
|
||||
|
||||
|
|
@ -135,7 +135,7 @@ Item {
|
|||
Flow {
|
||||
id: actionsflow
|
||||
Layout.fillWidth: true
|
||||
spacing: units.smallSpacing
|
||||
spacing: PlasmaCore.Units.smallSpacing
|
||||
layoutDirection: Qt.RightToLeft
|
||||
Repeater {
|
||||
id: actionRepeater
|
||||
|
|
@ -192,7 +192,7 @@ Item {
|
|||
} else {
|
||||
slideAnim.restart();
|
||||
}
|
||||
if (notificationItem.notification.hasDefaultAction && Math.abs(rect.x) < units.gridUnit) {
|
||||
if (notificationItem.notification.hasDefaultAction && Math.abs(rect.x) < PlasmaCore.Units.gridUnit) {
|
||||
if (notificationItem.notification.category === "x-kde.incoming-call") {
|
||||
notifModel.invokeDefaultAction(notificationItem.notification.notificationId);
|
||||
} else {
|
||||
|
|
@ -208,7 +208,7 @@ Item {
|
|||
target: rect
|
||||
property: "x"
|
||||
to: 0
|
||||
duration: units.longDuration
|
||||
duration: PlasmaCore.Units.longDuration
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,21 +61,21 @@ PlasmaCore.ColorScope {
|
|||
target: lay
|
||||
from: 10
|
||||
to: 1
|
||||
duration: units.longDuration
|
||||
duration: PlasmaCore.Units.longDuration
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
OpacityAnimator {
|
||||
target: lay
|
||||
from: 0
|
||||
to: 1
|
||||
duration: units.longDuration
|
||||
duration: PlasmaCore.Units.longDuration
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
OpacityAnimator {
|
||||
target: background
|
||||
from: 0
|
||||
to: 0.6
|
||||
duration: units.longDuration
|
||||
duration: PlasmaCore.Units.longDuration
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
}
|
||||
|
|
@ -92,21 +92,21 @@ PlasmaCore.ColorScope {
|
|||
target: lay
|
||||
from: 1
|
||||
to: 10
|
||||
duration: units.longDuration
|
||||
duration: PlasmaCore.Units.longDuration
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
OpacityAnimator {
|
||||
target: lay
|
||||
from: 1
|
||||
to: 0
|
||||
duration: units.longDuration
|
||||
duration: PlasmaCore.Units.longDuration
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
OpacityAnimator {
|
||||
target: background
|
||||
from: 0.6
|
||||
to: 0
|
||||
duration: units.longDuration
|
||||
duration: PlasmaCore.Units.longDuration
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
}
|
||||
|
|
@ -125,8 +125,8 @@ PlasmaCore.ColorScope {
|
|||
id: lay
|
||||
anchors.centerIn: parent
|
||||
columns: 2
|
||||
rowSpacing: units.gridUnit * 2
|
||||
columnSpacing: units.gridUnit * 2
|
||||
rowSpacing: PlasmaCore.Units.gridUnit * 2
|
||||
columnSpacing: PlasmaCore.Units.gridUnit * 2
|
||||
scale: 2
|
||||
opacity: 0
|
||||
ActionButton {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ Text {
|
|||
horizontalAlignment: Qt.AlignHCenter
|
||||
verticalAlignment: Qt.AlignVCenter
|
||||
color: dialer.textColor
|
||||
font.pixelSize: Math.floor((width - (units.largeSpacing)) / 2)
|
||||
font.pixelSize: Math.floor((width - (PlasmaCore.Units.largeSpacing)) / 2)
|
||||
property alias sub: longHold.text
|
||||
property var callback
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ Item {
|
|||
|
||||
PlasmaCore.IconItem {
|
||||
id: icon
|
||||
width: units.iconSizes.medium
|
||||
width: PlasmaCore.Units.iconSizes.medium
|
||||
height: width
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
|
|
|
|||
|
|
@ -128,9 +128,9 @@ PlasmaCore.ColorScope {
|
|||
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
anchors.topMargin: 2*units.gridUnit
|
||||
anchors.bottomMargin: units.gridUnit
|
||||
spacing: units.gridUnit
|
||||
anchors.topMargin: 2*PlasmaCore.Units.gridUnit
|
||||
anchors.bottomMargin: PlasmaCore.Units.gridUnit
|
||||
spacing: PlasmaCore.Units.gridUnit
|
||||
|
||||
// pin dot display
|
||||
Item {
|
||||
|
|
@ -166,7 +166,7 @@ PlasmaCore.ColorScope {
|
|||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: simLabel.bottom
|
||||
anchors.topMargin: units.gridUnit
|
||||
anchors.topMargin: PlasmaCore.Units.gridUnit
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
font.pointSize: 12
|
||||
|
|
@ -179,14 +179,14 @@ PlasmaCore.ColorScope {
|
|||
RowLayout {
|
||||
id: dotDisplay
|
||||
anchors.centerIn: parent
|
||||
height: units.gridUnit * 2.5 // maintain height when letter is shown
|
||||
height: PlasmaCore.Units.gridUnit * 2.5 // maintain height when letter is shown
|
||||
spacing: 6
|
||||
|
||||
Repeater {
|
||||
model: root.pin.length
|
||||
delegate: Rectangle { // dot
|
||||
visible: index !== root.pin.length-1 || root.lastKey === "" // hide dot if number is shown
|
||||
Layout.preferredWidth: units.gridUnit * 0.5
|
||||
Layout.preferredWidth: PlasmaCore.Units.gridUnit * 0.5
|
||||
Layout.preferredHeight: Layout.preferredWidth
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
radius: width
|
||||
|
|
@ -206,10 +206,10 @@ PlasmaCore.ColorScope {
|
|||
// number keys
|
||||
GridLayout {
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
|
||||
Layout.leftMargin: units.gridUnit * 0.5
|
||||
Layout.rightMargin: units.gridUnit * 0.5
|
||||
Layout.maximumWidth: units.gridUnit * 22
|
||||
Layout.maximumHeight: (root.height > root.width) ? units.gridUnit * 17.5 : units.gridUnit * 12.5
|
||||
Layout.leftMargin: PlasmaCore.Units.gridUnit * 0.5
|
||||
Layout.rightMargin: PlasmaCore.Units.gridUnit * 0.5
|
||||
Layout.maximumWidth: PlasmaCore.Units.gridUnit * 22
|
||||
Layout.maximumHeight: (root.height > root.width) ? PlasmaCore.Units.gridUnit * 17.5 : PlasmaCore.Units.gridUnit * 12.5
|
||||
columns: 3
|
||||
|
||||
Repeater {
|
||||
|
|
@ -283,7 +283,7 @@ PlasmaCore.ColorScope {
|
|||
}
|
||||
}
|
||||
Item {
|
||||
height: units.gridUnit * 0.5
|
||||
height: PlasmaCore.Units.gridUnit * 0.5
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue