summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPapoteur <yves.brungard_mageia@gadz.org>2022-08-31 20:15:37 +0200
committerPapoteur <yves.brungard_mageia@gadz.org>2022-08-31 20:15:37 +0200
commitc3bb39f229423114f81d79b76a07a9115ca65b03 (patch)
treeb8bb135a9a0997acb7ee694f619ba857432565d7
parent166238c8b718e7ceb4c1647adad35755465ffeed (diff)
downloadmageia-sddm-c3bb39f229423114f81d79b76a07a9115ca65b03.tar
mageia-sddm-c3bb39f229423114f81d79b76a07a9115ca65b03.tar.gz
mageia-sddm-c3bb39f229423114f81d79b76a07a9115ca65b03.tar.bz2
mageia-sddm-c3bb39f229423114f81d79b76a07a9115ca65b03.tar.xz
mageia-sddm-c3bb39f229423114f81d79b76a07a9115ca65b03.zip
Sync theme with Plasma oneHEADmaster
-rw-r--r--Main.qml75
-rw-r--r--components/ActionButton.qml59
-rw-r--r--components/Battery.qml21
-rw-r--r--components/Clock.qml39
-rw-r--r--components/SessionManagementScreen.qml44
-rw-r--r--components/UserDelegate.qml74
-rw-r--r--components/UserList.qml30
-rw-r--r--components/VirtualKeyboard.qml20
-rw-r--r--components/VirtualKeyboard_wayland.qml24
-rw-r--r--components/WallpaperFader.qml72
-rw-r--r--theme.conf1
11 files changed, 214 insertions, 245 deletions
diff --git a/Main.qml b/Main.qml
index 6ab23e4..ddf1866 100644
--- a/Main.qml
+++ b/Main.qml
@@ -159,7 +159,7 @@ PlasmaCore.ColorScope {
left: parent.left
right: parent.right
}
- height: root.height + units.gridUnit * 3
+ height: root.height + PlasmaCore.Units.gridUnit * 3
focus: true //StackView is an implicit focus scope, so we need to give this focus so the item inside will have it
@@ -181,7 +181,15 @@ PlasmaCore.ColorScope {
userListCurrentIndex: userModel.lastIndex >= 0 ? userModel.lastIndex : 0
lastUserName: userModel.lastUser
showUserList: {
- return false
+ if ( !userListModel.hasOwnProperty("count")
+ || !userListModel.hasOwnProperty("disableAvatarsThreshold"))
+ return (userList.y + mainStack.y) > 0
+
+ if ( userListModel.count === 0 ) return false
+
+ if ( userListModel.hasOwnProperty("containsAllUsers") && !userListModel.containsAllUsers ) return false
+
+ return userListModel.count <= userListModel.disableAvatarsThreshold && (userList.y + mainStack.y) > 0
}
notificationMessage: {
@@ -238,7 +246,7 @@ PlasmaCore.ColorScope {
Behavior on opacity {
OpacityAnimator {
- duration: units.longDuration
+ duration: PlasmaCore.Units.longDuration
}
}
}
@@ -250,9 +258,6 @@ PlasmaCore.ColorScope {
onKeyboardActiveChanged: {
if (keyboardActive) {
state = "visible"
- // Otherwise the password field loses focus and virtual keyboard
- // keystrokes get eaten
- userListComponent.mainPasswordBox.forceActiveFocus();
} else {
state = "hidden";
}
@@ -308,18 +313,18 @@ PlasmaCore.ColorScope {
NumberAnimation {
target: mainStack
property: "y"
- duration: units.longDuration
+ duration: PlasmaCore.Units.longDuration
easing.type: Easing.InOutQuad
}
NumberAnimation {
target: inputPanel
property: "y"
- duration: units.longDuration
+ duration: PlasmaCore.Units.longDuration
easing.type: Easing.OutQuad
}
OpacityAnimator {
target: inputPanel
- duration: units.longDuration
+ duration: PlasmaCore.Units.longDuration
easing.type: Easing.OutQuad
}
}
@@ -333,18 +338,18 @@ PlasmaCore.ColorScope {
NumberAnimation {
target: mainStack
property: "y"
- duration: units.longDuration
+ duration: PlasmaCore.Units.longDuration
easing.type: Easing.InOutQuad
}
NumberAnimation {
target: inputPanel
property: "y"
- duration: units.longDuration
+ duration: PlasmaCore.Units.longDuration
easing.type: Easing.InQuad
}
OpacityAnimator {
target: inputPanel
- duration: units.longDuration
+ duration: PlasmaCore.Units.longDuration
easing.type: Easing.InQuad
}
}
@@ -419,7 +424,49 @@ PlasmaCore.ColorScope {
]
}
}
-
+
+ DropShadow {
+ id: logoShadow
+ anchors.fill: logo
+ source: logo
+ visible: !softwareRendering && config.showlogo == "shown"
+ horizontalOffset: 1
+ verticalOffset: 1
+ radius: 6
+ samples: 14
+ spread: 0.3
+ color: "black" // matches Breeze window decoration and desktopcontainment
+ opacity: loginScreenRoot.uiVisible ? 0 : 1
+ Behavior on opacity {
+ //OpacityAnimator when starting from 0 is buggy (it shows one frame with opacity 1)"
+ NumberAnimation {
+ duration: PlasmaCore.Units.longDuration
+ easing.type: Easing.InOutQuad
+ }
+ }
+ }
+
+ Image {
+ id: logo
+ visible: config.showlogo == "shown"
+ source: config.logo
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.bottom: footer.top
+ anchors.bottomMargin: PlasmaCore.Units.largeSpacing
+ asynchronous: true
+ sourceSize.height: height
+ opacity: loginScreenRoot.uiVisible ? 0 : 1
+ fillMode: Image.PreserveAspectFit
+ height: Math.round(PlasmaCore.Units.gridUnit * 3.5)
+ Behavior on opacity {
+ // OpacityAnimator when starting from 0 is buggy (it shows one frame with opacity 1)"
+ NumberAnimation {
+ duration: PlasmaCore.Units.longDuration
+ easing.type: Easing.InOutQuad
+ }
+ }
+ }
+
//Footer
RowLayout {
id: footer
@@ -432,7 +479,7 @@ PlasmaCore.ColorScope {
Behavior on opacity {
OpacityAnimator {
- duration: units.longDuration
+ duration: PlasmaCore.Units.longDuration
}
}
diff --git a/components/ActionButton.qml b/components/ActionButton.qml
index 342e0f9..af278f6 100644
--- a/components/ActionButton.qml
+++ b/components/ActionButton.qml
@@ -1,21 +1,8 @@
/*
- * Copyright 2016 David Edmundson <davidedmundson@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2 or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
+ SPDX-FileCopyrightText: 2016 David Edmundson <davidedmundson@kde.org>
+
+ SPDX-License-Identifier: LGPL-2.0-or-later
+*/
import QtQuick 2.8
import org.kde.plasma.core 2.0 as PlasmaCore
@@ -36,32 +23,32 @@ 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
- easing.type: Easing.InOutQuad
- }
+ Behavior on opacity {
+ PropertyAnimation { // OpacityAnimator makes it turn black at random intervals
+ duration: PlasmaCore.Units.longDuration
+ easing.type: Easing.InOutQuad
+ }
}
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)
+ opacity: root.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
- easing.type: Easing.InOutQuad
- }
+ PropertyAnimation { // OpacityAnimator makes it turn black at random intervals
+ duration: PlasmaCore.Units.longDuration
+ easing.type: Easing.InOutQuad
+ }
}
}
@@ -74,10 +61,10 @@ Item {
color: PlasmaCore.ColorScope.textColor
opacity: 0.15
Behavior on scale {
- PropertyAnimation {
- duration: units.shortDuration
- easing.type: Easing.InOutQuart
- }
+ PropertyAnimation {
+ duration: PlasmaCore.Units.shortDuration
+ easing.type: Easing.InOutQuart
+ }
}
}
@@ -99,7 +86,7 @@ Item {
font.pointSize: root.fontSize
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
}
diff --git a/components/Battery.qml b/components/Battery.qml
index 93796c6..05be535 100644
--- a/components/Battery.qml
+++ b/components/Battery.qml
@@ -1,21 +1,8 @@
/*
- * Copyright 2016 Kai Uwe Broulik <kde@privat.broulik.de>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2 or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
+ SPDX-FileCopyrightText: 2016 Kai Uwe Broulik <kde@privat.broulik.de>
+
+ SPDX-License-Identifier: LGPL-2.0-or-later
+*/
import QtQuick 2.2
diff --git a/components/Clock.qml b/components/Clock.qml
index cece7be..fbe0c7c 100644
--- a/components/Clock.qml
+++ b/components/Clock.qml
@@ -1,47 +1,34 @@
/*
- * Copyright 2016 David Edmundson <davidedmundson@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2 or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
+ SPDX-FileCopyrightText: 2016 David Edmundson <davidedmundson@kde.org>
+
+ SPDX-License-Identifier: LGPL-2.0-or-later
+*/
import QtQuick 2.8
import QtQuick.Layouts 1.1
-import QtQuick.Controls 2.5
-import org.kde.plasma.core 2.0
+import QtQuick.Controls 2.5 as QQC2
+import org.kde.plasma.core 2.0 as PlasmaCore
ColumnLayout {
readonly property bool softwareRendering: GraphicsInfo.api === GraphicsInfo.Software
- Label {
+ QQC2.Label {
text: Qt.formatTime(timeSource.data["Local"]["DateTime"])
- color: ColorScope.textColor
+ color: PlasmaCore.ColorScope.textColor
style: softwareRendering ? Text.Outline : Text.Normal
- styleColor: softwareRendering ? ColorScope.backgroundColor : "transparent" //no outline, doesn't matter
+ styleColor: softwareRendering ? PlasmaCore.ColorScope.backgroundColor : "transparent" //no outline, doesn't matter
font.pointSize: 48
Layout.alignment: Qt.AlignHCenter
}
- Label {
+ QQC2.Label {
text: Qt.formatDate(timeSource.data["Local"]["DateTime"], Qt.DefaultLocaleLongDate)
- color: ColorScope.textColor
+ color: PlasmaCore.ColorScope.textColor
style: softwareRendering ? Text.Outline : Text.Normal
- styleColor: softwareRendering ? ColorScope.backgroundColor : "transparent" //no outline, doesn't matter
+ styleColor: softwareRendering ? PlasmaCore.ColorScope.backgroundColor : "transparent" //no outline, doesn't matter
font.pointSize: 24
Layout.alignment: Qt.AlignHCenter
}
- DataSource {
+ PlasmaCore.DataSource {
id: timeSource
engine: "time"
connectedSources: ["Local"]
diff --git a/components/SessionManagementScreen.qml b/components/SessionManagementScreen.qml
index 58110c5..0e87d26 100644
--- a/components/SessionManagementScreen.qml
+++ b/components/SessionManagementScreen.qml
@@ -1,21 +1,8 @@
/*
- * Copyright 2016 David Edmundson <davidedmundson@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2 or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
+ SPDX-FileCopyrightText: 2016 David Edmundson <davidedmundson@kde.org>
+
+ SPDX-License-Identifier: LGPL-2.0-or-later
+*/
import QtQuick 2.2
@@ -25,7 +12,7 @@ import QtQuick.Controls 1.1
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 3.0 as PlasmaComponents3
-Item {
+FocusScope {
id: root
/*
@@ -56,7 +43,7 @@ Item {
* Self explanatory
*/
property alias userListCurrentIndex: userListView.currentIndex
- property var userListCurrentModelData: userListView.currentItem === null ? [] : userListView.currentItem.m
+ property alias userListCurrentItem: userListView.currentItem
property bool showUserList: true
property alias userList: userListView
@@ -65,11 +52,18 @@ Item {
default property alias _children: innerLayout.children
+ // FIXME: move this component into a layout, rather than abusing
+ // anchors and implicitly relying on other components' built-in
+ // whitespace to avoid items being overlapped.
UserList {
id: userListView
visible: showUserList && y > 0
anchors {
bottom: parent.verticalCenter
+ // We only need an extra bottom margin when text is constrained,
+ // since only in this case can the username label be a multi-line
+ // string that would otherwise overflow.
+ bottomMargin: constrainText ? PlasmaCore.Units.gridUnit * 3 : 0
left: parent.left
right: parent.right
}
@@ -82,14 +76,14 @@ Item {
ColumnLayout {
id: prompts
anchors.top: parent.verticalCenter
- anchors.topMargin: units.gridUnit * 0.5
+ anchors.topMargin: PlasmaCore.Units.gridUnit * 0.5
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
PlasmaComponents3.Label {
id: notificationsLabel
font.pointSize: root.fontSize
- Layout.maximumWidth: units.gridUnit * 16
+ Layout.maximumWidth: PlasmaCore.Units.gridUnit * 16
Layout.alignment: Qt.AlignHCenter
Layout.fillWidth: true
horizontalAlignment: Text.AlignHCenter
@@ -98,8 +92,8 @@ Item {
}
ColumnLayout {
Layout.minimumHeight: implicitHeight
- Layout.maximumHeight: units.gridUnit * 10
- Layout.maximumWidth: units.gridUnit * 16
+ Layout.maximumHeight: PlasmaCore.Units.gridUnit * 10
+ Layout.maximumWidth: PlasmaCore.Units.gridUnit * 16
Layout.alignment: Qt.AlignHCenter
ColumnLayout {
id: innerLayout
@@ -112,8 +106,8 @@ Item {
}
Row { //deliberately not rowlayout as I'm not trying to resize child items
id: actionItemsLayout
- spacing: units.largeSpacing / 2
- Layout.alignment: Qt.AlignHCenter
+ spacing: PlasmaCore.Units.largeSpacing / 2
+ Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
}
Item {
Layout.fillHeight: true
diff --git a/components/UserDelegate.qml b/components/UserDelegate.qml
index 8658b85..2e1270b 100644
--- a/components/UserDelegate.qml
+++ b/components/UserDelegate.qml
@@ -1,26 +1,12 @@
/*
- * Copyright 2014 David Edmundson <davidedmundson@kde.org>
- * Copyright 2014 Aleix Pol Gonzalez <aleixpol@blue-systems.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2 or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
+ SPDX-FileCopyrightText: 2014 David Edmundson <davidedmundson@kde.org>
+ SPDX-FileCopyrightText: 2014 Aleix Pol Gonzalez <aleixpol@blue-systems.com>
-import QtQuick 2.8
-import QtGraphicalEffects 1.0
+ SPDX-License-Identifier: LGPL-2.0-or-later
+*/
+import QtQuick 2.8
+import QtQuick.Window 2.15
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 3.0 as PlasmaComponents3
@@ -33,23 +19,24 @@ Item {
property bool isCurrent: true
- readonly property var m: model
property string name
property string userName
property string avatarPath
property string iconSource
+ property bool needsPassword
+ property var vtNumber
property bool constrainText: true
property alias nameFontSize: usernameDelegate.font.pointSize
property int fontSize: PlasmaCore.Theme.defaultFont.pointSize + 2
signal clicked()
- property real faceSize: units.gridUnit * 7
+ property real faceSize: PlasmaCore.Units.gridUnit * 7
opacity: isCurrent ? 1.0 : 0.5
Behavior on opacity {
OpacityAnimator {
- duration: units.longDuration
+ duration: PlasmaCore.Units.longDuration
}
}
@@ -61,30 +48,28 @@ Item {
radius: width / 2
color: PlasmaCore.ColorScope.backgroundColor
- opacity: 0.9
+ opacity: 0.6
}
Item {
id: imageSource
- anchors {
- bottom: usernameDelegate.top
- bottomMargin: units.largeSpacing
- horizontalCenter: parent.horizontalCenter
- }
- Behavior on width {
+ anchors.top: parent.top
+ anchors.horizontalCenter: parent.horizontalCenter
+
+ Behavior on width {
PropertyAnimation {
from: faceSize
- duration: units.longDuration;
+ duration: PlasmaCore.Units.longDuration;
}
}
- 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
Image {
id: face
source: wrapper.avatarPath
- sourceSize: Qt.size(faceSize, faceSize)
+ sourceSize: Qt.size(faceSize * Screen.devicePixelRatio, faceSize * Screen.devicePixelRatio)
fillMode: Image.PreserveAspectCrop
anchors.fill: parent
}
@@ -94,17 +79,14 @@ 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
}
}
ShaderEffect {
- anchors {
- bottom: usernameDelegate.top
- bottomMargin: units.largeSpacing
- horizontalCenter: parent.horizontalCenter
- }
+ anchors.top: parent.top
+ anchors.horizontalCenter: parent.horizontalCenter
width: imageSource.width
height: imageSource.height
@@ -163,15 +145,19 @@ Item {
PlasmaComponents3.Label {
id: usernameDelegate
- font.pointSize: wrapper.fontSize
- anchors {
- bottom: parent.bottom
- horizontalCenter: parent.horizontalCenter
- }
+
+ anchors.top: imageSource.bottom
+ anchors.horizontalCenter: parent.horizontalCenter
+
+ // Make it bigger than other fonts to match the scale of the avatar better
+ font.pointSize: wrapper.fontSize + 4
+
width: constrainText ? parent.width : implicitWidth
text: wrapper.name
style: softwareRendering ? Text.Outline : Text.Normal
styleColor: softwareRendering ? PlasmaCore.ColorScope.backgroundColor : "transparent" //no outline, doesn't matter
+ wrapMode: Text.WordWrap
+ maximumLineCount: wrapper.constrainText ? 3 : 1
elide: Text.ElideRight
horizontalAlignment: Text.AlignHCenter
//make an indication that this has active focus, this only happens when reached with keyboard navigation
diff --git a/components/UserList.qml b/components/UserList.qml
index dbac102..1f612ec 100644
--- a/components/UserList.qml
+++ b/components/UserList.qml
@@ -1,21 +1,8 @@
/*
- * Copyright 2014 David Edmundson <davidedmundson@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2 or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
+ SPDX-FileCopyrightText: 2014 David Edmundson <davidedmundson@kde.org>
+
+ SPDX-License-Identifier: LGPL-2.0-or-later
+*/
import QtQuick 2.2
import org.kde.plasma.core 2.0 as PlasmaCore
@@ -23,8 +10,9 @@ import org.kde.plasma.core 2.0 as PlasmaCore
ListView {
id: view
readonly property string selectedUser: currentItem ? currentItem.userName : ""
- readonly property int userItemWidth: units.gridUnit * 8
- readonly property int userItemHeight: units.gridUnit * 8
+ readonly property int userItemWidth: PlasmaCore.Units.gridUnit * 8
+ readonly property int userItemHeight: PlasmaCore.Units.gridUnit * 8
+ readonly property bool constrainText: count > 1
property int fontSize: PlasmaCore.Theme.defaultFont.pointSize + 2
implicitHeight: userItemHeight
@@ -50,6 +38,8 @@ ListView {
avatarPath: model.icon || ""
iconSource: model.iconName || "user-identity"
fontSize: view.fontSize
+ vtNumber: model.vtNumber
+ needsPassword: model.needsPassword
name: {
var displayName = model.realName || model.name
@@ -83,7 +73,7 @@ ListView {
height: userItemHeight
//if we only have one delegate, we don't need to clip the text as it won't be overlapping with anything
- constrainText: ListView.view.count > 1
+ constrainText: view.constrainText
isCurrent: ListView.isCurrentItem
diff --git a/components/VirtualKeyboard.qml b/components/VirtualKeyboard.qml
index edc7ab4..503a35b 100644
--- a/components/VirtualKeyboard.qml
+++ b/components/VirtualKeyboard.qml
@@ -1,21 +1,9 @@
-/********************************************************************
- This file is part of the KDE project.
+/*
+ SPDX-FileCopyrightText: 2017 Martin Gräßlin <mgraesslin@kde.org>
-Copyright (C) 2017 Martin Gräßlin <mgraesslin@kde.org>
+ SPDX-License-Identifier: GPL-2.0-or-later
+*/
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*********************************************************************/
import QtQuick 2.5
import QtQuick.VirtualKeyboard 2.1
import org.kde.plasma.core 2.0 as PlasmaCore
diff --git a/components/VirtualKeyboard_wayland.qml b/components/VirtualKeyboard_wayland.qml
new file mode 100644
index 0000000..b15dbf5
--- /dev/null
+++ b/components/VirtualKeyboard_wayland.qml
@@ -0,0 +1,24 @@
+/*
+ SPDX-FileCopyrightText: 2021 Aleix Pol Gonzalez <aleixpol@kde.org>
+
+ SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
+*/
+
+import QtQuick 2.15
+import org.kde.plasma.workspace.keyboardlayout 1.0 as Keyboards
+
+Item {
+ id: inputPanel
+ readonly property bool active: Keyboards.KWinVirtualKeyboard.visible
+ property bool activated: false
+ visible: Keyboards.KWinVirtualKeyboard.visible
+
+ x: Qt.inputMethod.keyboardRectangle.x
+ y: Qt.inputMethod.keyboardRectangle.y
+ height: Qt.inputMethod.keyboardRectangle.height
+ width: Qt.inputMethod.keyboardRectangle.width
+
+ onActivatedChanged: if (activated) {
+ Keyboards.KWinVirtualKeyboard.enabled = true
+ }
+}
diff --git a/components/WallpaperFader.qml b/components/WallpaperFader.qml
index c695d69..5c885d1 100644
--- a/components/WallpaperFader.qml
+++ b/components/WallpaperFader.qml
@@ -1,21 +1,8 @@
-/********************************************************************
- This file is part of the KDE project.
+/*
+ SPDX-FileCopyrightText: 2014 Aleix Pol Gonzalez <aleixpol@blue-systems.com>
-Copyright (C) 2014 Aleix Pol Gonzalez <aleixpol@blue-systems.com>
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*********************************************************************/
+ SPDX-License-Identifier: GPL-2.0-or-later
+*/
import QtQuick 2.6
import QtQuick.Controls 1.1
@@ -23,7 +10,6 @@ import QtQuick.Layouts 1.1
import QtGraphicalEffects 1.0
import org.kde.plasma.core 2.0 as PlasmaCore
-import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.private.sessions 2.0
import "../components"
@@ -44,14 +30,14 @@ Item {
NumberAnimation {
target: wallpaperFader
property: "factor"
- duration: 1000
+ duration: PlasmaCore.Units.veryLongDuration * 2
easing.type: Easing.InOutQuad
}
}
FastBlur {
id: wallpaperBlur
anchors.fill: parent
- radius: -100 * wallpaperFader.factor
+ radius: 50 * wallpaperFader.factor
}
ShaderEffect {
id: wallpaperShader
@@ -121,6 +107,10 @@ Item {
target: clock.shadow
opacity: 0
}
+ PropertyChanges {
+ target: clock
+ opacity: 1
+ }
},
State {
name: "off"
@@ -138,7 +128,11 @@ Item {
}
PropertyChanges {
target: clock.shadow
- opacity: 1
+ opacity: wallpaperFader.alwaysShowClock ? 1 : 0
+ }
+ PropertyChanges {
+ target: clock
+ opacity: wallpaperFader.alwaysShowClock ? 1 : 0
}
}
]
@@ -147,37 +141,21 @@ Item {
from: "off"
to: "on"
//Note: can't use animators as they don't play well with parallelanimations
- ParallelAnimation {
- NumberAnimation {
- target: mainStack
- property: "opacity"
- duration: units.longDuration
- easing.type: Easing.InOutQuad
- }
- NumberAnimation {
- target: footer
- property: "opacity"
- duration: units.longDuration
- easing.type: Easing.InOutQuad
- }
+ NumberAnimation {
+ targets: [mainStack, footer, clock]
+ property: "opacity"
+ duration: PlasmaCore.Units.veryLongDuration
+ easing.type: Easing.InOutQuad
}
},
Transition {
from: "on"
to: "off"
- ParallelAnimation {
- NumberAnimation {
- target: mainStack
- property: "opacity"
- duration: 500
- easing.type: Easing.InOutQuad
- }
- NumberAnimation {
- target: footer
- property: "opacity"
- duration: 500
- easing.type: Easing.InOutQuad
- }
+ NumberAnimation {
+ targets: [mainStack, footer, clock]
+ property: "opacity"
+ duration: PlasmaCore.Units.veryLongDuration
+ easing.type: Easing.InOutQuad
}
}
]
diff --git a/theme.conf b/theme.conf
index 975c0c2..b6c97f7 100644
--- a/theme.conf
+++ b/theme.conf
@@ -4,3 +4,4 @@ color=#1d99f3
background=/usr/share/mga/backgrounds/default.png
blur=false
fontSize=10
+logo=/usr/share/sddm/themes/breeze/default-logo.svg