summaryrefslogtreecommitdiff
path: root/components/CheckBox.qml
blob: 13e36779f704f38b8aac36ffd7dc0311672b3152 (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
import QtQuick 1.1
import "custom" as Components

// jb : Size should not depend on background, we should make it consistent

Components.CheckBox {
    id:checkbox
    property string text
    property string styleHint
    property bool activeFocusOnPress: false
    width: Math.max(110, backgroundItem.textWidth(text) + 40)
    height: 20

    background: StyleItem {
        id: styleitem
        elementType: "checkbox"
        sunken: pressed
        on: checked || pressed
        hover: containsMouse
        text: checkbox.text
        enabled: checkbox.enabled
        hasFocus: checkbox.activeFocus
        hint: checkbox.styleHint
    }
}