mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-23 22:51:12 -04:00
Create custom button icon component
This commit is contained in:
parent
cb96b9fac6
commit
66d63c29b3
2 changed files with 88 additions and 0 deletions
27
retroshare-qml-app/src/components/BtnIcon.qml
Normal file
27
retroshare-qml-app/src/components/BtnIcon.qml
Normal file
|
@ -0,0 +1,27 @@
|
|||
import QtQuick 2.0
|
||||
|
||||
Item {
|
||||
|
||||
id: root
|
||||
signal clicked
|
||||
// signal pressed
|
||||
// signal released
|
||||
|
||||
property var imgUrl: ""
|
||||
|
||||
Image {
|
||||
|
||||
anchors.fill: parent
|
||||
source: imgUrl
|
||||
|
||||
height: parent.height
|
||||
width: parent.width
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: root
|
||||
onClicked: { root.clicked() }
|
||||
// onPressed: { root.pressed() }
|
||||
// onReleased: { root.released() }
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue