Changeset View
Changeset View
Standalone View
Standalone View
lookandfeel/contents/components/ActionButton.qml
Show All 30 Lines | 24 | Item { | |||
---|---|---|---|---|---|
31 | 31 | | |||
32 | activeFocusOnTab: true | 32 | activeFocusOnTab: true | ||
33 | 33 | | |||
34 | property int iconSize: units.gridUnit * 3 | 34 | property int iconSize: units.gridUnit * 3 | ||
35 | 35 | | |||
36 | implicitWidth: Math.max(iconSize + units.largeSpacing * 2, label.contentWidth) | 36 | implicitWidth: Math.max(iconSize + units.largeSpacing * 2, label.contentWidth) | ||
37 | implicitHeight: iconSize + units.smallSpacing + label.implicitHeight | 37 | implicitHeight: iconSize + units.smallSpacing + label.implicitHeight | ||
38 | 38 | | |||
39 | opacity: ( containsMouse || activeFocus ) ? 1 : 0.8 | ||||
40 | | ||||
39 | PlasmaCore.IconItem { | 41 | PlasmaCore.IconItem { | ||
davidedmundson: I ran with:
opacity: activeFocus || containsMouse ? 1 : 0.85
Behavior on opacity {… | |||||
40 | id: icon | 42 | id: icon | ||
41 | anchors { | 43 | anchors { | ||
42 | top: parent.top | 44 | top: parent.top | ||
43 | horizontalCenter: parent.horizontalCenter | 45 | horizontalCenter: parent.horizontalCenter | ||
44 | } | 46 | } | ||
45 | width: iconSize | 47 | width: iconSize | ||
46 | height: iconSize | 48 | height: iconSize | ||
47 | 49 | | |||
48 | colorGroup: PlasmaCore.ColorScope.colorGroup | 50 | colorGroup: PlasmaCore.ColorScope.colorGroup | ||
49 | active: mouseArea.containsMouse || root.activeFocus | 51 | active: mouseArea.containsMouse || root.activeFocus | ||
50 | } | 52 | } | ||
davidedmundson: width/2 | |||||
51 | 53 | | |||
52 | PlasmaComponents.Label { | 54 | PlasmaComponents.Label { | ||
53 | id: label | 55 | id: label | ||
54 | font.pointSize: 11 | 56 | font.pointSize: 11 | ||
55 | anchors { | 57 | anchors { | ||
56 | top: icon.bottom | 58 | top: icon.bottom | ||
57 | topMargin: units.smallSpacing | 59 | topMargin: units.smallSpacing | ||
58 | left: parent.left | 60 | left: parent.left | ||
Show All 23 Lines |
I ran with:
on my system, worked fine. Can you give any more details on "randomly"