Add unlock animation
parent
4d4938e971
commit
d85ff147e1
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="16" height="16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
||||
<metadata>
|
||||
<rdf:RDF>
|
||||
<cc:Work rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
|
||||
<dc:title/>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<path d="m2 9.7143v-3.4286h6.8571v-3.4286l5.1429 5.1429-5.1429 5.1429v-3.4286z" fill="#fff" fill-rule="evenodd" stroke-width="1.7143" paint-order="stroke fill markers"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 653 B |
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="16" height="16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
||||
<metadata>
|
||||
<rdf:RDF>
|
||||
<cc:Work rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
|
||||
<dc:title/>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<path class="ColorScheme-Text" d="m12 0c-2.216 0-4 1.784-4 4v2h1v-2c0-1.662 1.338-3 3-3s3 1.338 3 3v2h1v-2c0-2.216-1.784-4-4-4z" fill="#fff"/>
|
||||
<path class="ColorScheme-Text" d="m2 6c-1.108 0-2 0.892-2 2v5c0 1.108 0.892 2 2 2h8c1.108 0 2-0.892 2-2v-5c0-1.108-0.892-2-2-2zm0 1h8c0.554 0 1 0.446 1 1v5c0 0.554-0.446 1-1 1h-8c-0.554 0-1-0.446-1-1v-5c0-0.554 0.446-1 1-1z" fill="#fff"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 866 B |
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="16" height="16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
||||
<metadata>
|
||||
<rdf:RDF>
|
||||
<cc:Work rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
|
||||
<dc:title/>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<path d="m8 0c-2.216 0-4 1.784-4 4v2h1v-2c0-1.662 1.338-3 3-3s3 1.338 3 3v2h1v-2c0-2.216-1.784-4-4-4z" fill="#fff"/>
|
||||
<path d="m4 6c-1.108 0-2 0.892-2 2v5c0 1.108 0.892 2 2 2h8c1.108 0 2-0.892 2-2v-5c0-1.108-0.892-2-2-2zm0 1h8c0.554 0 1 0.446 1 1v5c0 0.554-0.446 1-1 1h-8c-0.554 0-1-0.446-1-1v-5c0-0.554 0.446-1 1-1z" fill="#fff"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 815 B |
@ -1,5 +1,9 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>qml/LockScreen.qml</file>
|
||||
<file>images/login.svg</file>
|
||||
<file>qml/LoginButton.qml</file>
|
||||
<file>images/screensaver-unlock-symbolic.svg</file>
|
||||
<file>images/system-lock-screen-symbolic.svg</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
||||
@ -0,0 +1,71 @@
|
||||
/*
|
||||
* Copyright (C) 2021 CutefishOS Team.
|
||||
*
|
||||
* Author: Reion Wong <reion@cutefishos.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 3 of the License, or
|
||||
* 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.12
|
||||
import QtQuick.Window 2.3
|
||||
import QtQuick.Controls 2.4
|
||||
import FishUI 1.0 as FishUI
|
||||
|
||||
Item {
|
||||
id: control
|
||||
|
||||
property var size: 32
|
||||
property var iconMargins: 0
|
||||
height: size
|
||||
width: size
|
||||
|
||||
property alias background: _background
|
||||
property color backgroundColor: FishUI.Theme.highlightColor
|
||||
property color hoveredColor: Qt.lighter(backgroundColor, 1.1)
|
||||
property color pressedColor: Qt.darker(backgroundColor, 1.2)
|
||||
property alias source: _image.source
|
||||
property alias image: _image
|
||||
signal clicked()
|
||||
|
||||
Rectangle {
|
||||
id: _background
|
||||
anchors.fill: parent
|
||||
// radius: FishUI.Theme.bigRadius //control.height / 2
|
||||
color: mouseArea.pressed ? pressedColor : mouseArea.containsMouse ? control.hoveredColor : control.backgroundColor
|
||||
|
||||
gradient: Gradient {
|
||||
GradientStop { position: 0.0; color: Qt.lighter(_background.color, 1.3) }
|
||||
GradientStop { position: 1.0; color: _background.color }
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: mouseArea
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
|
||||
onClicked: control.clicked()
|
||||
}
|
||||
|
||||
Image {
|
||||
id: _image
|
||||
objectName: "image"
|
||||
anchors.fill: parent
|
||||
anchors.margins: control.iconMargins
|
||||
fillMode: Image.PreserveAspectFit
|
||||
sourceSize: Qt.size(width, height)
|
||||
cache: true
|
||||
asynchronous: false
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue