summaryrefslogtreecommitdiff
path: root/src/widgets/Button.qml
blob: 8f2e01d26a8c9740822b462a0788570fd5e41334 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import QtQuick 1.0
import "custom" as Components
import "plugin"

Components.Button {
    id:button

    property int buttonHeight: Math.max(22, styleitem.sizeFromContents(100, 6).height)
    height: buttonHeight

    QStyleItem {
        id:styleitem
        elementType:"button"
        sunken: pressed
        raised: !pressed
        hover: containsMouse
        enabled:button.enabled
        text:button.text
    }

    background:
    QStyleBackground {
        style:styleitem
        anchors.fill:parent
    }
}