Changeset View
Changeset View
Standalone View
Standalone View
lookandfeel/contents/lockscreen/LockScreenUi.qml
Show All 11 Lines | |||||
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | GNU General Public License for more details. | 14 | GNU General Public License for more details. | ||
15 | 15 | | |||
16 | You should have received a copy of the GNU General Public License | 16 | You should have received a copy of the GNU General Public License | ||
17 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 17 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
18 | *********************************************************************/ | 18 | *********************************************************************/ | ||
19 | 19 | | |||
20 | import QtQuick 2.6 | 20 | import QtQuick 2.8 | ||
21 | import QtQuick.Controls 1.1 | 21 | import QtQuick.Controls 1.1 | ||
22 | import QtQuick.Layouts 1.1 | 22 | import QtQuick.Layouts 1.1 | ||
23 | import QtGraphicalEffects 1.0 | 23 | import QtGraphicalEffects 1.0 | ||
24 | 24 | | |||
25 | import org.kde.plasma.core 2.0 as PlasmaCore | 25 | import org.kde.plasma.core 2.0 as PlasmaCore | ||
26 | import org.kde.plasma.components 2.0 as PlasmaComponents | 26 | import org.kde.plasma.components 2.0 as PlasmaComponents | ||
27 | 27 | | |||
28 | import org.kde.plasma.private.sessions 2.0 | 28 | import org.kde.plasma.private.sessions 2.0 | ||
29 | import "../components" | 29 | import "../components" | ||
30 | 30 | | |||
31 | PlasmaCore.ColorScope { | 31 | PlasmaCore.ColorScope { | ||
32 | 32 | | |||
33 | // If we're using software rendering, draw outlines instead of shadows | ||||
34 | // See https://bugs.kde.org/show_bug.cgi?id=398317 | ||||
35 | readonly property bool softwareRendering: GraphicsInfo.api === GraphicsInfo.Software | ||||
36 | | ||||
33 | colorGroup: PlasmaCore.Theme.ComplementaryColorGroup | 37 | colorGroup: PlasmaCore.Theme.ComplementaryColorGroup | ||
34 | 38 | | |||
35 | Connections { | 39 | Connections { | ||
36 | target: authenticator | 40 | target: authenticator | ||
37 | onFailed: { | 41 | onFailed: { | ||
38 | root.notification = i18nd("plasma_lookandfeel_org.kde.lookandfeel","Unlocking failed"); | 42 | root.notification = i18nd("plasma_lookandfeel_org.kde.lookandfeel","Unlocking failed"); | ||
39 | } | 43 | } | ||
40 | onGraceLockedChanged: { | 44 | onGraceLockedChanged: { | ||
▲ Show 20 Lines • Show All 115 Lines • ▼ Show 20 Line(s) | 159 | WallpaperFader { | |||
156 | anchors.fill: parent | 160 | anchors.fill: parent | ||
157 | state: lockScreenRoot.uiVisible ? "on" : "off" | 161 | state: lockScreenRoot.uiVisible ? "on" : "off" | ||
158 | source: wallpaper | 162 | source: wallpaper | ||
159 | mainStack: mainStack | 163 | mainStack: mainStack | ||
160 | footer: footer | 164 | footer: footer | ||
161 | clock: clock | 165 | clock: clock | ||
162 | } | 166 | } | ||
163 | 167 | | |||
168 | DropShadow { | ||||
169 | id: clockShadow | ||||
170 | anchors.fill: clock | ||||
171 | source: clock | ||||
172 | visible: !softwareRendering | ||||
173 | horizontalOffset: 1 | ||||
174 | verticalOffset: 1 | ||||
175 | radius: 6 | ||||
176 | samples: 14 | ||||
177 | spread: 0.3 | ||||
178 | color: "black" // matches Breeze window decoration and desktopcontainment | ||||
179 | Behavior on opacity { | ||||
180 | OpacityAnimator { | ||||
181 | duration: 1000 | ||||
182 | easing.type: Easing.InOutQuad | ||||
183 | } | ||||
184 | } | ||||
185 | } | ||||
186 | | ||||
164 | Clock { | 187 | Clock { | ||
165 | id: clock | 188 | id: clock | ||
166 | property Item shadow: clockShadow | 189 | property Item shadow: clockShadow | ||
167 | anchors.horizontalCenter: parent.horizontalCenter | 190 | anchors.horizontalCenter: parent.horizontalCenter | ||
168 | y: (mainBlock.userList.y + mainStack.y)/2 - height/2 | 191 | y: (mainBlock.userList.y + mainStack.y)/2 - height/2 | ||
169 | visible: y > 0 | 192 | visible: y > 0 | ||
170 | Layout.alignment: Qt.AlignBaseline | 193 | Layout.alignment: Qt.AlignBaseline | ||
171 | } | 194 | } | ||
▲ Show 20 Lines • Show All 286 Lines • Show Last 20 Lines |