summaryrefslogtreecommitdiff
path: root/src/controls/Styles/Base/ButtonStyle.qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/controls/Styles/Base/ButtonStyle.qml')
-rw-r--r--src/controls/Styles/Base/ButtonStyle.qml17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/controls/Styles/Base/ButtonStyle.qml b/src/controls/Styles/Base/ButtonStyle.qml
index b7ddb5be..d6a87540 100644
--- a/src/controls/Styles/Base/ButtonStyle.qml
+++ b/src/controls/Styles/Base/ButtonStyle.qml
@@ -96,9 +96,10 @@ Style {
/*! This defines the background of the button. */
property Component background: Item {
implicitWidth: 100
- implicitHeight: 25
+ implicitHeight: Math.max(25, Math.round(TextSingleton.implicitHeight * 1.1))
BorderImage {
anchors.fill: parent
+ anchors.margins: -1
source: control.pressed || (control.checkable && control.checked) ? "images/button_down.png" : "images/button.png"
border.top: 6
border.bottom: 6
@@ -107,17 +108,21 @@ Style {
anchors.bottomMargin: -1
BorderImage {
anchors.fill: parent
- anchors.margins: -1
- anchors.topMargin: -2
- anchors.rightMargin: 0
- anchors.bottomMargin: 1
source: "images/focusframe.png"
- visible: control.activeFocus
+ opacity: control.activeFocus ? 1 : 0
border.left: 4
border.right: 4
border.top: 4
border.bottom: 4
}
+ Rectangle {
+ anchors.fill: parent
+ anchors.margins: 2
+ radius: 2
+ color: "white"
+ opacity: control.hovered || control.activeFocus ? 0.2 : 0
+ Behavior on opacity {NumberAnimation{ duration: 100 }}
+ }
}
Image {
id: imageItem