mirror of https://github.com/cutefishos/screenshot
Add tools bar
parent
6677d8b883
commit
ab00504a93
@ -0,0 +1,22 @@
|
||||
<svg width="24" height="24" version="1.1" viewBox="0 0 24 24" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
|
||||
<g transform="matrix(.039062 0 0 .039062 1.9999 2.0002)">
|
||||
|
||||
<path d="m284.29 256 221.86-221.86c7.811-7.811 7.811-20.475 0-28.285s-20.475-7.811-28.285 0l-221.86 221.86-221.86-221.86c-7.811-7.811-20.475-7.811-28.285 0s-7.811 20.475 0 28.285l221.86 221.86-221.86 221.86c-7.811 7.811-7.811 20.475 0 28.285 3.905 3.905 9.024 5.857 14.143 5.857s10.237-1.952 14.143-5.857l221.86-221.86 221.86 221.86c3.905 3.905 9.024 5.857 14.143 5.857s10.237-1.952 14.143-5.857c7.811-7.811 7.811-20.475 0-28.285z"/>
|
||||
|
||||
</g>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 644 B |
@ -0,0 +1,18 @@
|
||||
<svg width="24" height="24" version="1.1" viewBox="0 0 24 24" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<path d="m7.4111 20.823c-0.2709 0-0.54206-0.10314-0.74808-0.31045l-6.3528-6.3528c-0.41359-0.41385-0.41359-1.0844 0-1.498 0.4136-0.4136 1.0841-0.4136 1.4977 0l5.6047 5.6047 14.779-14.779c0.41386-0.41359 1.0844-0.41359 1.498 0 0.41359 0.41359 0.41359 1.0841 0 1.4977l-15.529 15.529c-0.20757 0.20602-0.47848 0.30916-0.74964 0.30916z" stroke-width=".066175"/></svg>
|
||||
|
After Width: | Height: | Size: 497 B |
@ -0,0 +1,18 @@
|
||||
<svg width="24" height="24" version="1.1" viewBox="0 0 24 24" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<path d="m11.377 22.736c0.17151 0.17151 0.4024 0.26387 0.62669 0.26387s0.45517-0.08575 0.62669-0.26387l5.66-5.66c0.34962-0.34962 0.34962-0.91034 0-1.26s-0.91035-0.34962-1.26 0l-4.1361 4.1427v-18.068c0-0.49475-0.3958-0.89055-0.89056-0.89055-0.49476 0-0.89056 0.3958-0.89056 0.89055v18.068l-4.1427-4.1427c-0.34962-0.34962-0.91035-0.34962-1.26 0s-0.34962 0.91034 0 1.26z" stroke-width=".065967"/></svg>
|
||||
|
After Width: | Height: | Size: 535 B |
@ -1,5 +1,9 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>qml/main.qml</file>
|
||||
<file>images/cancel.svg</file>
|
||||
<file>qml/ImageButton.qml</file>
|
||||
<file>images/ok.svg</file>
|
||||
<file>images/save.svg</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
||||
@ -0,0 +1,69 @@
|
||||
/*
|
||||
* Copyright (C) 2021 CutefishOS Team.
|
||||
*
|
||||
* Author: Reion Wong <reionwong@gmail.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 color hoveredColor: FishUI.Theme.darkMode ? Qt.lighter(FishUI.Theme.backgroundColor, 2)
|
||||
: Qt.darker(FishUI.Theme.backgroundColor, 1.2)
|
||||
property color pressedColor: FishUI.Theme.darkMode ? Qt.lighter(FishUI.Theme.backgroundColor, 1.5)
|
||||
: Qt.darker(FishUI.Theme.backgroundColor, 1.3)
|
||||
property alias source: _image.source
|
||||
property alias image: _image
|
||||
signal clicked()
|
||||
|
||||
Rectangle {
|
||||
id: background
|
||||
anchors.fill: parent
|
||||
anchors.margins: size * 0.1
|
||||
radius: control.height / 2
|
||||
color: mouseArea.pressed ? pressedColor : mouseArea.containsMouse ? control.hoveredColor : "transparent"
|
||||
}
|
||||
|
||||
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
|
||||
smooth: false
|
||||
antialiasing: true
|
||||
asynchronous: false
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue