mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-28 08:10:47 +02:00
some more work on saving stations
This commit is contained in:
@@ -2,28 +2,43 @@ import QtQuick 1.1
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
color: buttonMouseArea.containsMouse ? "blue" : "gray"
|
||||
border.width: 2
|
||||
border.color: "white"
|
||||
radius: height/2
|
||||
height: buttonText.height * 1.2
|
||||
width: buttonText.width * 1.5
|
||||
height: contentRow.height + defaultFontHeight / 2
|
||||
width: contentRow.width + defaultFontHeight / 2
|
||||
|
||||
property alias text: buttonText.text
|
||||
property color textColor: "white"
|
||||
property alias imageSource: image.source
|
||||
property bool enabled: true
|
||||
|
||||
color: "transparent"
|
||||
border.width: defaultFontHeight / 16
|
||||
border.color: buttonMouseArea.containsMouse ? "lightblue" : "transparent"
|
||||
radius: defaultFontHeight / 4
|
||||
|
||||
signal clicked()
|
||||
|
||||
Text {
|
||||
id: buttonText
|
||||
Row {
|
||||
id: contentRow
|
||||
spacing: defaultFontHeight / 4
|
||||
width: childrenRect.width
|
||||
height: childrenRect.height
|
||||
anchors.centerIn: parent
|
||||
color: root.textColor
|
||||
Image {
|
||||
id: image
|
||||
height: defaultFontHeight
|
||||
width: source.length == 0 ? 0 : height
|
||||
}
|
||||
|
||||
Text {
|
||||
id: buttonText
|
||||
color: root.enabled ? "black" : "grey"
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: buttonMouseArea
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
hoverEnabled: root.enabled
|
||||
enabled: root.enabled
|
||||
onClicked: root.clicked();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user