add close button
This commit is contained in:
parent
693078b892
commit
5d5e3c6888
6 changed files with 56 additions and 30 deletions
|
|
@ -16,6 +16,17 @@ Item{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RoundButton{
|
||||||
|
id: closeApp
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.margins: container.margins
|
||||||
|
imageSource: "qrc:/icon_close"
|
||||||
|
onClicked: {
|
||||||
|
Qt.quit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Rectangle{
|
Rectangle{
|
||||||
id: coverBorder
|
id: coverBorder
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|
|
||||||
|
|
@ -4,18 +4,31 @@ import QtQuick 2.0
|
||||||
* @brief Navigation view containing list view displaying artists or genres and albums
|
* @brief Navigation view containing list view displaying artists or genres and albums
|
||||||
*/
|
*/
|
||||||
Item {
|
Item {
|
||||||
|
id: container
|
||||||
|
property int margins: 20
|
||||||
RoundButton{
|
RoundButton{
|
||||||
id: back
|
id: back
|
||||||
|
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.margins: 20
|
anchors.margins: container.margins
|
||||||
|
|
||||||
visible: navigationList.pIsBackVisible
|
visible: navigationList.pIsBackVisible
|
||||||
|
|
||||||
onClicked: navigationList.navigateBack();
|
onClicked: navigationList.navigateBack();
|
||||||
} // RoundButton: navigate back
|
} // RoundButton: navigate back
|
||||||
|
|
||||||
|
RoundButton{
|
||||||
|
id: closeApp
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.margins: container.margins
|
||||||
|
imageSource: "qrc:/icon_close"
|
||||||
|
onClicked: {
|
||||||
|
Qt.quit();
|
||||||
|
}
|
||||||
|
} // RoundButton: closeApp
|
||||||
|
|
||||||
Rectangle{
|
Rectangle{
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,22 @@
|
||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
|
import QtQuick.Controls 2.4
|
||||||
|
|
||||||
Rectangle {
|
/**
|
||||||
|
* @brief Round button containing an image
|
||||||
|
*/
|
||||||
|
Button {
|
||||||
id: container
|
id: container
|
||||||
property alias imageSource: image.source
|
property alias imageSource: image.source
|
||||||
signal clicked();
|
|
||||||
|
background: Rectangle{
|
||||||
|
|
||||||
border.width: 2
|
border.width: 2
|
||||||
border.color: "grey"
|
border.color: "grey"
|
||||||
|
|
||||||
color: "white"
|
color: "white"
|
||||||
|
|
||||||
width: 65
|
implicitWidth: 65
|
||||||
height: width
|
implicitHeight: width
|
||||||
radius: width/2
|
radius: width/2
|
||||||
|
|
||||||
Image{
|
Image{
|
||||||
|
|
@ -31,11 +36,5 @@ Rectangle {
|
||||||
color: "#99ffffff"
|
color: "#99ffffff"
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea{
|
|
||||||
id: controlObject
|
|
||||||
anchors.fill: parent
|
|
||||||
onClicked:{
|
|
||||||
container.clicked();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,5 +8,6 @@
|
||||||
<file alias="icon_next">resources/next.jpg</file>
|
<file alias="icon_next">resources/next.jpg</file>
|
||||||
<file alias="icon_previous">resources/previous.jpg</file>
|
<file alias="icon_previous">resources/previous.jpg</file>
|
||||||
<file alias="icon_stop">resources/stop.jpg</file>
|
<file alias="icon_stop">resources/stop.jpg</file>
|
||||||
|
<file alias="icon_close">resources/close.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,8 @@ Window {
|
||||||
height: 480
|
height: 480
|
||||||
title: "LenaPi 1.2"
|
title: "LenaPi 1.2"
|
||||||
|
|
||||||
|
Component.onCompleted: showMaximized();
|
||||||
|
|
||||||
Image{
|
Image{
|
||||||
id: background
|
id: background
|
||||||
|
|
||||||
|
|
|
||||||
BIN
LenaPi/resources/close.png
Normal file
BIN
LenaPi/resources/close.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.5 KiB |
Loading…
Add table
Add a link
Reference in a new issue